summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-02-25 09:29:54 +0000
committerElgarL <ElgarL@palmergames.com>2012-02-25 09:29:54 +0000
commit50bd5869bf18421918c6ef9f5ffe0fa46ccfb894 (patch)
tree9d1223a01765619d1c6c788980ff56199054003b
parentfa49fc91d2454b2da193ed2b757356b2496d504c (diff)
downloadEssentials-50bd5869bf18421918c6ef9f5ffe0fa46ccfb894.tar
Essentials-50bd5869bf18421918c6ef9f5ffe0fa46ccfb894.tar.gz
Essentials-50bd5869bf18421918c6ef9f5ffe0fa46ccfb894.tar.lz
Essentials-50bd5869bf18421918c6ef9f5ffe0fa46ccfb894.tar.xz
Essentials-50bd5869bf18421918c6ef9f5ffe0fa46ccfb894.zip
Prevent promoting players to, and demoting to GlobalGroups.
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java28
2 files changed, 30 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index bb5cbf550..1159607ed 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -144,4 +144,5 @@ v 1.9:
- A command of '/manload' with no world arguments now performs a full reload of GM.
- Update for Bukkit R5 compatability.
- Removed BukkitPermsOverride as this is now the default with bukkit handling child nodes.
- - Prevent adding inheritances to globalgroups. These are permissions collections, not player groups. \ No newline at end of file
+ - Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
+ - Prevent promoting players to, and demoting to GlobalGroups. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 3c39c24d7..b0d46ca1a 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -398,6 +398,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group not found!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "Players may not be members of GlobalGroups directly.");
+ return false;
+ }
// VALIDANDO PERMISSAO
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
@@ -1232,6 +1236,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group does not exists!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
+ return false;
+ }
// VALIDANDO PERMISSAO
// PARECE OK
auxString = "";
@@ -1261,6 +1269,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group does not exists!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
+ return false;
+ }
// VALIDANDO PERMISSAO
if (!auxGroup.getVariables().hasVar(args[1])) {
sender.sendMessage(ChatColor.RED + "The group doesn't have directly that variable!");
@@ -1286,6 +1298,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group does not exists!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
+ return false;
+ }
// VALIDANDO PERMISSAO
// PARECE OK
auxString = "";
@@ -1323,6 +1339,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group does not exists!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
+ return false;
+ }
// VALIDANDO PERMISSAO
auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1], null);
if (auxGroup2 == null) {
@@ -1588,6 +1608,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group not found!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "Players may not be members of GlobalGroups directly.");
+ return false;
+ }
// VALIDANDO PERMISSAO
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.");
@@ -1644,6 +1668,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Group not found!");
return false;
}
+ if (auxGroup.isGlobal()) {
+ sender.sendMessage(ChatColor.RED + "Players may not be members of GlobalGroups directly.");
+ return false;
+ }
// VALIDANDO PERMISSAO
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.");