| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| GriefPrevention3D.jar | 2026-07-01 | 929.4 kB | |
| README.md | 2026-07-01 | 1.3 kB | |
| v18.2.1_ fix duplicate claims in causing negative claim blocks source code.tar.gz | 2026-07-01 | 642.3 kB | |
| v18.2.1_ fix duplicate claims in causing negative claim blocks source code.zip | 2026-07-01 | 826.8 kB | |
| Totals: 4 Items | 2.4 MB | 0 | |
GriefPrevention3D v18.2.1
Wiki: GriefPrevention3D Wiki
Fixes
/claimlist no longer shows duplicate claims; claim blocks no longer go negative
Fixed a bug where a player's claims could appear duplicated in /claimlist and their available claim blocks would drift negative. The issue affected players after logout or server restart (whenever their PlayerData was freshly created).
Root cause: DataStore.addClaim() added the claim to the global this.claims list first, then called ownerData.getClaims(). When the player's PlayerData was newly created (claims vector == null), getClaims() lazy-initialized by scanning this.claims — finding the same claim — then the caller added it a second time. Each duplicate caused getRemainingClaimBlocks() to subtract the claim's area twice, and /claimlist showed the claim twice.
The same bug existed in changeClaimOwner() (claim transfer).
Fix: Guard both .add() calls with a contains() check so a claim is never double-added to the owner's vector after lazy init already picked it up.
DataStore.java:addClaim()andchangeClaimOwner()now check!ownerClaims.contains(claim)before adding.