mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-30 16:19:11 +02:00
Fixed an error on 'manucheckv'. If the users doesn't have the variable
it fell through causing an exception. Added checking of subgroups for Info nodes.
This commit is contained in:
@@ -1176,11 +1176,17 @@ public class GroupManager extends JavaPlugin {
|
||||
}
|
||||
// VALIDANDO PERMISSAO
|
||||
auxGroup = auxUser.getGroup();
|
||||
auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1], null);
|
||||
auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1]);
|
||||
|
||||
if (!auxUser.getVariables().hasVar(args[1])) {
|
||||
// Check sub groups
|
||||
if (!auxUser.isSubGroupsEmpty() && auxGroup2 == null)
|
||||
for (Group subGroup : auxUser.subGroupListCopy()) {
|
||||
auxGroup2 = permissionHandler.nextGroupWithVariable(subGroup, args[1]);
|
||||
}
|
||||
if (auxGroup2 == null) {
|
||||
sender.sendMessage(ChatColor.RED + "The user doesn't have access to that variable!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// PARECE OK
|
||||
|
Reference in New Issue
Block a user