diff --git a/src/me/ryanhamshire/GriefPrevention/Claim.java b/src/me/ryanhamshire/GriefPrevention/Claim.java index a95592c..3c84169 100644 --- a/src/me/ryanhamshire/GriefPrevention/Claim.java +++ b/src/me/ryanhamshire/GriefPrevention/Claim.java @@ -620,7 +620,7 @@ public class Claim //excludeSubdivisions = true means that locations inside subdivisions of the claim will return FALSE public boolean contains(Location location, boolean ignoreHeight, boolean excludeSubdivisions) { - //not in the same world implies false + //not in the same world implies false if(!location.getWorld().equals(this.lesserBoundaryCorner.getWorld())) return false; int x = location.getBlockX(); diff --git a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java index 139680b..3611935 100644 --- a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java @@ -217,9 +217,7 @@ public class DatabaseDataStore extends DataStore { try { - //skip subdivisions - long parentId = results.getLong("parentid"); - + long parentId = results.getLong("parentid"); long claimID = results.getLong("id"); Location lesserBoundaryCorner = null; @@ -251,7 +249,7 @@ public class DatabaseDataStore extends DataStore UUID ownerID = null; if(ownerName.isEmpty()) { - ownerID = null; //administrative land claim + ownerID = null; //administrative land claim or subdivision } else if(this.getSchemaVersion() < 1) { @@ -312,20 +310,20 @@ public class DatabaseDataStore extends DataStore GriefPrevention.AddLogEntry("Unable to load a claim. Details: " + e.getMessage() + " ... " + results.toString()); e.printStackTrace(); } - - //add subdivisions to their parent claims - for(Claim childClaim : subdivisionsToLoad) - { - //find top level claim parent - Claim topLevelClaim = this.getClaimAt(childClaim.getLesserBoundaryCorner(), true, null); - - //add this claim to the list of children of the current top level claim - childClaim.parent = topLevelClaim; - topLevelClaim.children.add(childClaim); - childClaim.inDataStore = true; - } } + //add subdivisions to their parent claims + for(Claim childClaim : subdivisionsToLoad) + { + //find top level claim parent + Claim topLevelClaim = this.getClaimAt(childClaim.getLesserBoundaryCorner(), true, null); + + //add this claim to the list of children of the current top level claim + childClaim.parent = topLevelClaim; + topLevelClaim.children.add(childClaim); + childClaim.inDataStore = true; + } + for(int i = 0; i < claimsToRemove.size(); i++) { this.deleteClaimFromSecondaryStorage(claimsToRemove.get(i));