From f0d2fd93dd2f8e0d2ca0aeea30564ec3908d9f51 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sun, 14 Dec 2014 12:02:18 +1100 Subject: [PATCH] *Okay, so let's actually have it use lowercase unless you are forcing offline mode. --- .../plot/object/StringWrapper.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java index 0a29258cb..ccd9d9a0a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java @@ -21,6 +21,8 @@ package com.intellectualcrafters.plot.object; +import com.intellectualcrafters.plot.config.Settings; + /** * @author Empire92 */ @@ -54,7 +56,10 @@ public class StringWrapper { return false; } final StringWrapper other = (StringWrapper) obj; - return other.value.equals(this.value); + if (Settings.OFFLINE_MODE) { + return other.value.equals(this.value); + } + return other.value.toLowerCase().equals(this.value.toLowerCase()); } /** @@ -77,6 +82,9 @@ public class StringWrapper { if (this.value == null) { return 0; } - return this.value.hashCode(); + if (Settings.OFFLINE_MODE) { + return this.value.hashCode(); + } + return this.value.toLowerCase().hashCode(); } }