Fixed claims with subdivisions living on as ghosts.
Claims like this, when deleted, would still protect the area for any players who have that claim cached. This change seems to have fixed the issue.
This commit is contained in:
parent
c755926e40
commit
4c6b215407
|
|
@ -471,23 +471,29 @@ public abstract class DataStore
|
||||||
{
|
{
|
||||||
Claim parentClaim = claim.parent;
|
Claim parentClaim = claim.parent;
|
||||||
parentClaim.children.remove(claim);
|
parentClaim.children.remove(claim);
|
||||||
|
claim.inDataStore = false;
|
||||||
this.saveClaim(parentClaim);
|
this.saveClaim(parentClaim);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//delete any children
|
||||||
|
for(int j = 0; j < claim.children.size(); j++)
|
||||||
|
{
|
||||||
|
this.deleteClaim(claim.children.get(j));
|
||||||
|
}
|
||||||
|
|
||||||
|
//mark as deleted so any references elsewhere can be ignored
|
||||||
|
claim.inDataStore = false;
|
||||||
|
|
||||||
//remove from memory
|
//remove from memory
|
||||||
for(int i = 0; i < this.claims.size(); i++)
|
for(int i = 0; i < this.claims.size(); i++)
|
||||||
{
|
{
|
||||||
if(claims.get(i).id.equals(claim.id))
|
if(claims.get(i).id.equals(claim.id))
|
||||||
{
|
{
|
||||||
this.claims.remove(i);
|
this.claims.remove(i);
|
||||||
claim.inDataStore = false;
|
|
||||||
for(int j = 0; j < claim.children.size(); j++)
|
|
||||||
{
|
|
||||||
claim.children.get(j).inDataStore = false;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<String> chunkStrings = claim.getChunkStrings();
|
ArrayList<String> chunkStrings = claim.getChunkStrings();
|
||||||
for(String chunkString : chunkStrings)
|
for(String chunkString : chunkStrings)
|
||||||
|
|
@ -502,7 +508,6 @@ public abstract class DataStore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//remove from secondary storage
|
//remove from secondary storage
|
||||||
this.deleteClaimFromSecondaryStorage(claim);
|
this.deleteClaimFromSecondaryStorage(claim);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user