mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-31 11:35:28 +02:00
Add a command to reload locale
This commit is contained in:
@@ -47,6 +47,17 @@ public final class LocaleLoader {
|
||||
return formatString(rawMessage, messageArguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads locale
|
||||
*/
|
||||
public static void reloadLocale() {
|
||||
bundle = null;
|
||||
filesystemBundle = null;
|
||||
enBundle = null;
|
||||
bundleCache = new HashMap<>(); // Cheaper to replace than clear()
|
||||
initialize();
|
||||
}
|
||||
|
||||
private static String getRawString(String key) {
|
||||
if (filesystemBundle != null) {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user