diff --git a/pom.xml b/pom.xml index 2e26976..da6bc23 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.lupus LCommandFramework - 0.8.1 + 0.8.2 LCommandFramework diff --git a/src/main/java/org/lupus/commands/core/messages/I18n.kt b/src/main/java/org/lupus/commands/core/messages/I18n.kt index 4c5e229..bc591df 100644 --- a/src/main/java/org/lupus/commands/core/messages/I18n.kt +++ b/src/main/java/org/lupus/commands/core/messages/I18n.kt @@ -62,6 +62,14 @@ object I18n : HashMap>() { loadResourcesInDir("locales", plugin) } + fun reload(plugin: JavaPlugin) { + if(this[plugin] == null) + throw Exception("Plugin not loaded") + + this[plugin] = hashMapOf() + loadResourcesInDir("locales", plugin) + } + /** * Resets I18n initialization process for given plugin
* This basically resets the I18n for the plugin