Perf: Data storage.
This commit is contained in:
parent
d1e29e7972
commit
2f1084e35a
|
|
@ -366,7 +366,10 @@ public abstract class DataStore
|
||||||
//subdivisions are easy
|
//subdivisions are easy
|
||||||
if(newClaim.parent != null)
|
if(newClaim.parent != null)
|
||||||
{
|
{
|
||||||
newClaim.parent.children.add(newClaim);
|
if(!newClaim.parent.children.contains(newClaim))
|
||||||
|
{
|
||||||
|
newClaim.parent.children.add(newClaim);
|
||||||
|
}
|
||||||
newClaim.inDataStore = true;
|
newClaim.inDataStore = true;
|
||||||
if(writeToStorage)
|
if(writeToStorage)
|
||||||
{
|
{
|
||||||
|
|
@ -397,7 +400,6 @@ public abstract class DataStore
|
||||||
{
|
{
|
||||||
PlayerData ownerData = this.getPlayerData(newClaim.ownerID);
|
PlayerData ownerData = this.getPlayerData(newClaim.ownerID);
|
||||||
ownerData.getClaims().add(newClaim);
|
ownerData.getClaims().add(newClaim);
|
||||||
this.savePlayerData(newClaim.ownerID, ownerData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//make sure the claim is saved to disk
|
//make sure the claim is saved to disk
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user