From f254a99d89b03512118c1263d3a10bc65a7f8ee0 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 25 Mar 2020 15:53:28 +1300 Subject: [PATCH] Warning message if they've translated stuff but didn't enable translations --- .../disguise/utilities/translations/TranslateType.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateType.java b/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateType.java index 795db337..7807c26d 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateType.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateType.java @@ -90,6 +90,7 @@ public enum TranslateType { try { config.load(getFile()); int dupes = 0; + int diff = 0; for (String key : config.getKeys(false)) { String value = config.getString(key); @@ -118,8 +119,17 @@ public enum TranslateType { } translated.put(newKey, ChatColor.translateAlternateColorCodes('&', value)); + + if (!newKey.equals(translated.get(newKey))) { + diff++; + } } } + + if (diff > 0 && !DisguiseConfig.isUseTranslations()) { + DisguiseUtilities.getLogger().info(diff + + " translated strings, but translations has been disabled in config. Is this intended?"); + } } catch (Exception e) { e.printStackTrace();