Fix invalid configuration section for world aliases (#4000)

This commit is contained in:
Josh Roy 2021-02-21 00:09:34 -05:00 committed by GitHub
parent 81571fc014
commit 671983724a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -550,7 +550,11 @@ public class Settings implements net.ess3.api.ISettings {
private Map<String, String> _getWorldAliases() {
final Map<String, String> map = new HashMap<>();
final ConfigurationSection section = config.getConfigurationSection("");
final ConfigurationSection section = config.getConfigurationSection("chat.world-aliases");
if (section == null) {
return map;
}
for (String world : section.getKeys(false)) {
map.put(world.toLowerCase(), FormatUtil.replaceFormat(section.getString(world)));
}