mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-22 02:08:34 +01:00
Fix string conversion to upper case
This commit is contained in:
parent
a48aa0cec8
commit
4b7f63b024
@ -46,6 +46,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
@ -203,13 +204,13 @@ public class Island {
|
||||
|
||||
for (BasicPermission permission : allPermissions) {
|
||||
if (settingsDataConfig == null || settingsDataConfig.getFileConfiguration()
|
||||
.getString("Settings." + roleList.getFriendlyName().toUpperCase() + "." + permission.getName()) == null) {
|
||||
.getString("Settings." + roleList.name() + "." + permission.getName()) == null) {
|
||||
permissions.add(
|
||||
new IslandPermission(permission, this.plugin.getSettings()
|
||||
.getBoolean("Settings." + roleList.getFriendlyName().toUpperCase() + "." + permission.getName(), true)));
|
||||
.getBoolean("Settings." + roleList.name() + "." + permission.getName(), true)));
|
||||
} else {
|
||||
permissions.add(new IslandPermission(permission, settingsDataConfig.getFileConfiguration()
|
||||
.getBoolean("Settings." + roleList.getFriendlyName().toUpperCase() + "." + permission.getName(), true)));
|
||||
.getBoolean("Settings." + roleList.name() + "." + permission.getName(), true)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.craftaro.skyblock.localization.type.Localization;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
public class EnumLocalization<T extends Enum<T>> extends Localization<T> {
|
||||
@ -37,6 +38,6 @@ public class EnumLocalization<T extends Enum<T>> extends Localization<T> {
|
||||
}
|
||||
|
||||
protected T parseEnum(String input) {
|
||||
return Enum.valueOf(getType(), input.toUpperCase());
|
||||
return Enum.valueOf(getType(), input.toUpperCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user