From 844afb018302d0933f8e161e20748c8ebda655c3 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Tue, 24 Mar 2015 01:27:42 +1100 Subject: [PATCH] use equals --- .../intellectualcrafters/plot/object/PlotWorld.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java index 345292238..b204492be 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java @@ -94,7 +94,18 @@ public abstract class PlotWorld { this.worldname = worldname; } - public boolean compare(PlotWorld plotworld) { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + PlotWorld plotworld = (PlotWorld) obj; ConfigurationSection section = PlotSquared.config.getConfigurationSection("worlds"); for (ConfigurationNode setting : plotworld.getSettingNodes()) { Object constant = section.get(plotworld.worldname + "." + setting.getConstant());