mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-30 06:03: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) {
|
public boolean hasPermission(IslandRole role, BasicPermission permission) {
|
||||||
if (islandPermissions.containsKey(role)) {
|
if (islandPermissions.containsKey(role)) {
|
||||||
for (IslandPermission islandPermission : islandPermissions.get(role)) {
|
for (IslandPermission islandPermission : islandPermissions.get(role)) {
|
||||||
if (islandPermission.getPermission() == permission)
|
if (islandPermission.getPermission().equals(permission))
|
||||||
return islandPermission.getStatus();
|
return islandPermission.getStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -238,11 +238,19 @@ public class PermissionManager {
|
|||||||
switch(island.getRole(player)){
|
switch(island.getRole(player)){
|
||||||
case Owner:
|
case Owner:
|
||||||
if(!configLoad.getBoolean("Island.Settings.OwnersAndOperatorsAsMembers", false)){
|
if(!configLoad.getBoolean("Island.Settings.OwnersAndOperatorsAsMembers", false)){
|
||||||
|
if(permission.getType().equals(PermissionType.ISLAND)) {
|
||||||
return island.hasPermission(IslandRole.Owner, permission);
|
return island.hasPermission(IslandRole.Owner, permission);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case Operator:
|
case Operator:
|
||||||
if(!configLoad.getBoolean("Island.Settings.OwnersAndOperatorsAsMembers", false)){
|
if(!configLoad.getBoolean("Island.Settings.OwnersAndOperatorsAsMembers", false)){
|
||||||
|
if(permission.getType().equals(PermissionType.OPERATOR)) {
|
||||||
return island.hasPermission(IslandRole.Operator, permission);
|
return island.hasPermission(IslandRole.Operator, permission);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case Member:
|
case Member:
|
||||||
return island.hasPermission(IslandRole.Member, permission);
|
return island.hasPermission(IslandRole.Member, permission);
|
||||||
|
Loading…
Reference in New Issue
Block a user