diff --git a/README.md b/README.md index 2ed3bd7..b14dc74 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ Language Utils ============== -[![Gitter](https://badges.gitter.im/MascusJeoraly/LanguageUtils.svg)](https://gitter.im/MascusJeoraly/LanguageUtils?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build Status](https://snap-ci.com/MascusJeoraly/LanguageUtils/branch/master/build_image)](https://snap-ci.com/MascusJeoraly/LanguageUtils/branch/master) - A Bukkit/Spigot API offering the ability to get the name of **vanilla** items, entities, enchantments, and enchantment levels. The major version of this API supports 1.12. If you are using 1.7.10, 1.8.9, 1.9.4, 1.10.2, or 1.11.2, please download `1.4.0` version for 1.7.10(with suffix `-1.7.10`) or `1.4.0` for 1.8.9(no suffix), `1.5.x` for 1.9.4, or `1.6.x` for 1.10.2, `1.8.x` for 1.11.2 accordingly. @@ -11,7 +9,7 @@ Loading language files may cost 100-300 ms, but it should be fine to wait, and y Also, if you want to know how to add customized language entries, just read the `README.txt` inside `lang/` folder. -You can get the latest build [here](https://drone.io/github.com/MeowInnovation/LanguageUtils/files "here"). +Look also [this fork](https://github.com/NyaaCat/LanguageUtils) You CAN install this plugin on Cauldron/KCauldron servers if you are using 1.2.0.1-1.7.10+ version of this plugin. Again, the API only supports **vanilla** language entries. It will just return the auto-generated material name of an item in mods. @@ -112,4 +110,4 @@ If you are using Eclipse(not tested) ### Pull Request -If you find any problems or want to improve the efficiency, please send me PR or issues. \ No newline at end of file +If you find any problems or want to improve the efficiency, please send me PR or issues. diff --git a/src/main/java/com/meowj/langutils/LangUtils.java b/src/main/java/com/meowj/langutils/LangUtils.java index 5806565..0cd09f2 100644 --- a/src/main/java/com/meowj/langutils/LangUtils.java +++ b/src/main/java/com/meowj/langutils/LangUtils.java @@ -47,6 +47,7 @@ public void onEnable() { List defaultLang = new ArrayList<>(); defaultLang.add("en_us"); config.addDefault("LoadLanguage", defaultLang); + config.addDefault("LogSkipped", false); config.options().copyDefaults(true); saveConfig(); diff --git a/src/main/java/com/meowj/langutils/lang/convert/EnumLang.java b/src/main/java/com/meowj/langutils/lang/convert/EnumLang.java index 9d98517..5d6ae64 100644 --- a/src/main/java/com/meowj/langutils/lang/convert/EnumLang.java +++ b/src/main/java/com/meowj/langutils/lang/convert/EnumLang.java @@ -159,9 +159,11 @@ public static EnumLang get(String locale) { * Initialize this class, load all the languages to the corresponding HashMap. */ public static void init() { + boolean logSkipped = LangUtils.plugin.config.getBoolean("LogSkipped",false); for (EnumLang enumLang : EnumLang.values()) { if (!LangUtils.plugin.config.getStringList("LoadLanguage").contains("all") && !LangUtils.plugin.config.getStringList("LoadLanguage").contains(enumLang.getLocale())) { - LangUtils.plugin.info("Skipped " + enumLang.getLocale()); + if(logSkipped) + LangUtils.plugin.info("Skipped " + enumLang.getLocale()); continue; } try {