diff --git a/src/main/java/com/craftaro/skyblock/island/Island.java b/src/main/java/com/craftaro/skyblock/island/Island.java index 85318c8c..c59babda 100644 --- a/src/main/java/com/craftaro/skyblock/island/Island.java +++ b/src/main/java/com/craftaro/skyblock/island/Island.java @@ -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))); } } diff --git a/src/main/java/com/craftaro/skyblock/localization/type/impl/EnumLocalization.java b/src/main/java/com/craftaro/skyblock/localization/type/impl/EnumLocalization.java index a8c7d54b..cb4b4896 100644 --- a/src/main/java/com/craftaro/skyblock/localization/type/impl/EnumLocalization.java +++ b/src/main/java/com/craftaro/skyblock/localization/type/impl/EnumLocalization.java @@ -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> extends Localization { @@ -37,6 +38,6 @@ public class EnumLocalization> extends Localization { } protected T parseEnum(String input) { - return Enum.valueOf(getType(), input.toUpperCase()); + return Enum.valueOf(getType(), input.toUpperCase(Locale.US)); } }