Skip to content

Commit

Permalink
2.1-SNAPSHOT: 2.0.3: Fix language files not inheriting from default l…
Browse files Browse the repository at this point in the history
…ocale.
  • Loading branch information
SirBlobman committed Feb 4, 2021
1 parent 7e102e6 commit 3b317c7
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ public String getMessage(CommandSender sender, String key) {
return (message == null ? missingValue : message);
}

String defaultLocaleFileName = getDefaultLocaleFileName();
YamlConfiguration defaultConfig = this.configurationManager.get(defaultLocaleFileName);

if(defaultConfig.isList(key)) {
List<String> messageList = defaultConfig.getStringList(key);
return String.join("\n", messageList);
}

if(defaultConfig.isString(key)) {
String message = defaultConfig.getString(key);
return (message == null ? missingValue : message);
}

return missingValue;
}

Expand Down

0 comments on commit 3b317c7

Please sign in to comment.