From 87773d4929be037bad1b204eccde28b8a776a1b0 Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Thu, 6 Nov 2014 09:29:49 +0100 Subject: [PATCH] Created a better plot hashcode thingy --- .../main/java/com/intellectualcrafters/plot/Plot.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java index ffae6bb9f..6fbcea5bb 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java @@ -277,4 +277,14 @@ public class Plot implements Cloneable { PlotHelper.clear(plr, this); } + @Override + public int hashCode() { + final int + x = getId().x, + z = getId().y; + String + xL = (x + "").length() + "", + zL = (z + "").length() + ""; + return Integer.parseInt(xL + x + zL + z); + } }