mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00: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.
|
- A command of '/manload' with no world arguments now performs a full reload of GM.
|
||||||
- Update for Bukkit R5 compatability.
|
- Update for Bukkit R5 compatability.
|
||||||
- Removed BukkitPermsOverride as this is now the default with bukkit handling child nodes.
|
- 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!");
|
sender.sendMessage(ChatColor.RED + "Group not found!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "Players may not be members of GlobalGroups directly.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
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!");
|
sender.sendMessage(ChatColor.RED + "Group does not exists!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
// PARECE OK
|
// PARECE OK
|
||||||
auxString = "";
|
auxString = "";
|
||||||
|
@ -1261,6 +1269,10 @@ public class GroupManager extends JavaPlugin {
|
||||||
sender.sendMessage(ChatColor.RED + "Group does not exists!");
|
sender.sendMessage(ChatColor.RED + "Group does not exists!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
if (!auxGroup.getVariables().hasVar(args[1])) {
|
if (!auxGroup.getVariables().hasVar(args[1])) {
|
||||||
sender.sendMessage(ChatColor.RED + "The group doesn't have directly that variable!");
|
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!");
|
sender.sendMessage(ChatColor.RED + "Group does not exists!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
// PARECE OK
|
// PARECE OK
|
||||||
auxString = "";
|
auxString = "";
|
||||||
|
@ -1323,6 +1339,10 @@ public class GroupManager extends JavaPlugin {
|
||||||
sender.sendMessage(ChatColor.RED + "Group does not exists!");
|
sender.sendMessage(ChatColor.RED + "Group does not exists!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "GlobalGroups do NOT support Info Nodes.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1], null);
|
auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1], null);
|
||||||
if (auxGroup2 == null) {
|
if (auxGroup2 == null) {
|
||||||
|
@ -1588,6 +1608,10 @@ public class GroupManager extends JavaPlugin {
|
||||||
sender.sendMessage(ChatColor.RED + "Group not found!");
|
sender.sendMessage(ChatColor.RED + "Group not found!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "Players may not be members of GlobalGroups directly.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
if (!isConsole && !isOpOverride && (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.");
|
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!");
|
sender.sendMessage(ChatColor.RED + "Group not found!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auxGroup.isGlobal()) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "Players may not be members of GlobalGroups directly.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
if (!isConsole && !isOpOverride && (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.");
|
sender.sendMessage(ChatColor.RED + "Can't modify player with same permissions than you, or higher.");
|
||||||
|
|
Loading…
Reference in a new issue