mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-03 01:19:58 +01:00
fix isOpOverride checks
This commit is contained in:
parent
a73986a358
commit
ccfc23d629
@ -721,7 +721,7 @@ public class GroupManager extends JavaPlugin {
|
||||
auxUser = dataHolder.getUser(args[0]);
|
||||
}
|
||||
// Validating your permissions
|
||||
if (!isConsole && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||
sender.sendMessage(ChatColor.RED + "Can't modify player with same group than you, or higher.");
|
||||
return false;
|
||||
}
|
||||
@ -954,7 +954,7 @@ public class GroupManager extends JavaPlugin {
|
||||
}
|
||||
// Validating your permissions
|
||||
permissionResult = permissionHandler.checkFullUserPermission(senderUser, args[1]);
|
||||
if (!isConsole && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
|
||||
if (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
|
||||
sender.sendMessage(ChatColor.RED + "You can't add a permission you don't have.");
|
||||
return false;
|
||||
}
|
||||
@ -1545,7 +1545,7 @@ public class GroupManager extends JavaPlugin {
|
||||
auxUser = dataHolder.getUser(args[0]);
|
||||
}
|
||||
// Validating permission
|
||||
if (!isConsole && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||
sender.sendMessage(ChatColor.RED + "Can't modify player with same permissions than you, or higher.");
|
||||
return false;
|
||||
}
|
||||
@ -1579,7 +1579,7 @@ public class GroupManager extends JavaPlugin {
|
||||
auxUser = dataHolder.getUser(args[0]);
|
||||
}
|
||||
// Validating permission
|
||||
if (!isConsole && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||
sender.sendMessage(ChatColor.RED + "You can't modify a player with same permissions as you, or higher.");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user