Skip to content

Commit

Permalink
Fixed invalid privileges in the permissions-menu throwing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Jan 25, 2022
1 parent e51b461 commit 350750b
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -98,7 +98,11 @@ public static void init() {
for (String key : permissionsSection.getKeys(false)) {
if (permissionsSection.getBoolean(key + ".display-menu", true)) {
String permission = key.toLowerCase();
updatePermission(IslandPrivilege.getByName(permission), cfg, position++);
try {
updatePermission(IslandPrivilege.getByName(permission), cfg, position++);
} catch (NullPointerException error) {
SuperiorSkyblockPlugin.log("&cThe island-privilege '" + permission + "' is not a valid privilege, skipping...");
}
}
}
}
Expand Down

0 comments on commit 350750b

Please sign in to comment.