diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-03-10 14:42:03 +0200 |
---|---|---|
committer | Necrodoom <doomed.war@gmail.com> | 2013-03-10 14:42:03 +0200 |
commit | 973e918d3adbdf04776e117ab640b3ae5abe4afd (patch) | |
tree | d3519a54f566abcc9e0f155127e5c399b3155286 /EssentialsGroupManager | |
parent | fd3cdde3546ca44fc98d427920955f27b295dd79 (diff) | |
download | Essentials-973e918d3adbdf04776e117ab640b3ae5abe4afd.tar Essentials-973e918d3adbdf04776e117ab640b3ae5abe4afd.tar.gz Essentials-973e918d3adbdf04776e117ab640b3ae5abe4afd.tar.lz Essentials-973e918d3adbdf04776e117ab640b3ae5abe4afd.tar.xz Essentials-973e918d3adbdf04776e117ab640b3ae5abe4afd.zip |
readd some checks
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index 965203100..e27389d7a 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -1941,11 +1941,11 @@ public class GroupManager extends JavaPlugin { sender.sendMessage(ChatColor.RED + "You can't modify a player with same permissions as you, or higher."); return true; } - if (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName())) { + if (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName()))) { sender.sendMessage(ChatColor.RED + "The destination group can't be the same as yours, or higher."); return true; } - if (!permissionHandler.inGroup(senderUser.getName(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getName(), auxGroup.getName())) { + if (!isConsole && !isOpOverride && (!permissionHandler.inGroup(senderUser.getName(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getName(), auxGroup.getName()))) { sender.sendMessage(ChatColor.RED + "You can't modify a player involving a group that you don't inherit."); return true; } @@ -1997,11 +1997,11 @@ public class GroupManager extends JavaPlugin { sender.sendMessage(ChatColor.RED + "You can't modify a player with same permissions as you, or higher."); return true; } - if (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName())) { + if (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName()))) { sender.sendMessage(ChatColor.RED + "The destination group can't be the same as yours, or higher."); return true; } - if (!permissionHandler.inGroup(senderUser.getName(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getName(), auxGroup.getName())) { + if (!isConsole && !isOpOverride && (!permissionHandler.inGroup(senderUser.getName(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getName(), auxGroup.getName()))) { sender.sendMessage(ChatColor.RED + "You can't modify a player involving a group that you don't inherit."); return true; } |