Perf: Data storage.
This commit is contained in:
1 parent
d1e29e7972
commit
2f1084e35a
1 file changed
+3
-1
@@ -365,8 +365,11 @@ public abstract class DataStore
|
|||||||
{
|
{
|
||||||
//subdivisions are easy
|
//subdivisions are easy
|
||||||
if(newClaim.parent != null)
|
if(newClaim.parent != null)
|
||||||
|
{
|
||||||
|
if(!newClaim.parent.children.contains(newClaim))
|
||||||
{
|
{
|
||||||
newClaim.parent.children.add(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
|
||||||
|
|||||||
Reference in new issue
Block a user