mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-30 12:00:34 +08:00
Prevent promoting players to, and demoting to GlobalGroups.
This commit is contained in:
parent
fa49fc91d2
commit
50bd5869bf
@ -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.
|
||||
- Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
|
||||
- Prevent promoting players to, and demoting to GlobalGroups.
|
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user