mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 10:52:01 +00:00
add mising isopoverride check
This commit is contained in:
parent
69c40a2f1a
commit
061794e86d
|
@ -1118,7 +1118,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
}
|
}
|
||||||
// Validating your permissions
|
// Validating your permissions
|
||||||
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
||||||
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 + "Can't remove a permission you don't have.");
|
sender.sendMessage(ChatColor.RED + "Can't remove a permission you don't have.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1161,7 +1161,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
|
|
||||||
for (auxString : auxGroup.getPermissionList()) {
|
for (auxString : auxGroup.getPermissionList()) {
|
||||||
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
||||||
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 + "Can't remove a permission you don't have: '" + auxString + "'.");
|
sender.sendMessage(ChatColor.RED + "Can't remove a permission you don't have: '" + auxString + "'.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue