Skip to content

Commit

Permalink
Make global.yml load at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr committed Aug 13, 2021
1 parent a911450 commit 749f482
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/com/palmergames/bukkit/towny/object/Translation.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ public static void loadTranslationRegistry() {

for (Map.Entry<String, Object> entry : values.entrySet())
translations.get(lang).put(entry.getKey().toLowerCase(Locale.ROOT), String.valueOf(entry.getValue()));

//Can be null if no overrides have been added
if (globalOverrides != null)
for (Map.Entry<String, Object> entry : globalOverrides.entrySet())
translations.get(lang).put(entry.getKey().toLowerCase(Locale.ROOT), String.valueOf(entry.getValue()));
} catch (Exception e) {
// An IO exception occured, or the file had invalid yaml
e.printStackTrace();
Expand All @@ -102,6 +97,12 @@ public static void loadTranslationRegistry() {
}
}
}

//Can be null if no overrides have been added
if (globalOverrides != null)
for (Map.Entry<String, Object> entry : globalOverrides.entrySet())
for (String lang : translations.keySet())
translations.get(lang).put(entry.getKey().toLowerCase(Locale.ROOT), String.valueOf(entry.getValue()));

Towny.getPlugin().getLogger().info(String.format("Successfully loaded translations for %d languages.", translations.keySet().size()));
HelpMenu.loadMenus();
Expand Down

0 comments on commit 749f482

Please sign in to comment.