mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Do not process normal permissions for operators and owners
This commit is contained in:
parent
551af02570
commit
735f7cacd7
@ -725,7 +725,7 @@ public class Island {
|
||||
public boolean hasPermission(IslandRole role, BasicPermission permission) {
|
||||
if (islandPermissions.containsKey(role)) {
|
||||
for (IslandPermission islandPermission : islandPermissions.get(role)) {
|
||||
if (islandPermission.getPermission() == permission)
|
||||
if (islandPermission.getPermission().equals(permission))
|
||||
return islandPermission.getStatus();
|
||||
}
|
||||
}
|
||||
|
@ -238,11 +238,19 @@ public class PermissionManager {
|
||||
switch(island.getRole(player)){
|
||||
case Owner:
|
||||
if(!configLoad.getBoolean("Island.Settings.OwnersAndOperatorsAsMembers", false)){
|
||||
return island.hasPermission(IslandRole.Owner, permission);
|
||||
if(permission.getType().equals(PermissionType.ISLAND)) {
|
||||
return island.hasPermission(IslandRole.Owner, permission);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case Operator:
|
||||
if(!configLoad.getBoolean("Island.Settings.OwnersAndOperatorsAsMembers", false)){
|
||||
return island.hasPermission(IslandRole.Operator, permission);
|
||||
if(permission.getType().equals(PermissionType.OPERATOR)) {
|
||||
return island.hasPermission(IslandRole.Operator, permission);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case Member:
|
||||
return island.hasPermission(IslandRole.Member, permission);
|
||||
|
Loading…
Reference in New Issue
Block a user