From 0d4692c2af5ffe04455d235488191c9243195ac1 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 2 Jul 2017 17:11:20 +1200 Subject: [PATCH] Don't return all lower case --- src/me/libraryaddict/disguise/utilities/DisguiseParser.java | 1 + src/me/libraryaddict/disguise/utilities/TranslateType.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseParser.java b/src/me/libraryaddict/disguise/utilities/DisguiseParser.java index 007714f8..69c7da4b 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseParser.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseParser.java @@ -9,6 +9,7 @@ import java.util.Map.Entry; import com.google.gson.GsonBuilder; import com.mojang.authlib.GameProfile; import me.libraryaddict.disguise.utilities.json.SerializerGameProfile; +import org.apache.commons.lang3.StringUtils; import org.bukkit.Art; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/src/me/libraryaddict/disguise/utilities/TranslateType.java b/src/me/libraryaddict/disguise/utilities/TranslateType.java index a301bb38..44e3df62 100644 --- a/src/me/libraryaddict/disguise/utilities/TranslateType.java +++ b/src/me/libraryaddict/disguise/utilities/TranslateType.java @@ -126,10 +126,10 @@ public enum TranslateType { if (translated == null) return null; - translated = translated.toLowerCase(); + String lowerCase = translated.toLowerCase(); for (Map.Entry entry : this.translated.entrySet()) { - if (!Objects.equals(entry.getValue().toLowerCase(), translated)) + if (!Objects.equals(entry.getValue().toLowerCase(), lowerCase)) continue; return entry.getKey();