Skip to content

Commit

Permalink
Fix role names in island settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ceze88 committed Apr 18, 2024
1 parent 6e92c7f commit 9bfcc83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/craftaro/skyblock/island/Island.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,14 @@ public Island(@Nonnull OfflinePlayer player) {

for (BasicPermission permission : allPermissions) {
if (settingsDataConfig == null || settingsDataConfig.getFileConfiguration()
.getString("Settings." + roleList.name() + "." + permission.getName()) == null) {
.getString("Settings." + roleList.getFriendlyName().toUpperCase(Locale.US) + "." + permission.getName()) == null) {
//save default value if not exist
permissions.add(
new IslandPermission(permission, this.plugin.getSettings()
.getBoolean("Settings." + roleList.name() + "." + permission.getName(), true)));
.getBoolean("Settings." + roleList.getFriendlyName().toUpperCase(Locale.US) + "." + permission.getName(), permission.getDefaultValues().get(roleList))));
} else {
permissions.add(new IslandPermission(permission, settingsDataConfig.getFileConfiguration()
.getBoolean("Settings." + roleList.name() + "." + permission.getName(), true)));
.getBoolean("Settings." + roleList.getFriendlyName().toUpperCase(Locale.US) + "." + permission.getName(), true)));
}
}

Expand Down

0 comments on commit 9bfcc83

Please sign in to comment.