Don't return all lower case

This commit is contained in:
libraryaddict 2017-07-02 17:11:20 +12:00
parent d1d40775d2
commit 0d4692c2af
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -126,10 +126,10 @@ public enum TranslateType {
if (translated == null)
return null;
translated = translated.toLowerCase();
String lowerCase = translated.toLowerCase();
for (Map.Entry<String, String> entry : this.translated.entrySet()) {
if (!Objects.equals(entry.getValue().toLowerCase(), translated))
if (!Objects.equals(entry.getValue().toLowerCase(), lowerCase))
continue;
return entry.getKey();