From a285d73ca0090cb3c064e60659fffca83e65278d Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Sat, 28 Mar 2015 20:58:24 -0700 Subject: [PATCH] Fixed claims breakage. --- src/me/ryanhamshire/GriefPrevention/Claim.java | 4 +--- src/me/ryanhamshire/GriefPrevention/DataStore.java | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/Claim.java b/src/me/ryanhamshire/GriefPrevention/Claim.java index 081d76c..d64dba7 100644 --- a/src/me/ryanhamshire/GriefPrevention/Claim.java +++ b/src/me/ryanhamshire/GriefPrevention/Claim.java @@ -874,7 +874,6 @@ public class Claim public ArrayList getChunkStrings() { ArrayList chunkStrings = new ArrayList(); - World world = this.getLesserBoundaryCorner().getWorld(); int smallX = this.getLesserBoundaryCorner().getBlockX() >> 4; int smallZ = this.getLesserBoundaryCorner().getBlockZ() >> 4; int largeX = this.getGreaterBoundaryCorner().getBlockX() >> 4; @@ -884,8 +883,7 @@ public class Claim { for(int z = smallZ; z <= largeZ; z++) { - StringBuilder builder = new StringBuilder(String.valueOf(x)).append(world.getName()).append(z); - chunkStrings.add(builder.toString()); + chunkStrings.add(String.valueOf(x) + z); } } diff --git a/src/me/ryanhamshire/GriefPrevention/DataStore.java b/src/me/ryanhamshire/GriefPrevention/DataStore.java index d63d955..9ec5070 100644 --- a/src/me/ryanhamshire/GriefPrevention/DataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DataStore.java @@ -619,8 +619,8 @@ public abstract class DataStore return Collections.unmodifiableCollection(this.claims); } - //gets a unique, persistent identifier string for a chunk - private String getChunkString(Location location) + //gets an almost-unique, persistent identifier string for a chunk + String getChunkString(Location location) { return String.valueOf(location.getBlockX() >> 4) + (location.getBlockZ() >> 4); }