mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 17:12:03 +01:00
Fix 'manucheckp' to correctly report if a permission is available from
GroupManager or Bukkit.
This commit is contained in:
parent
7726fd0081
commit
4c485f3147
@ -96,3 +96,4 @@ v 1.8:
|
|||||||
- Changed the way events are raised to prevent variable corruption.
|
- Changed the way events are raised to prevent variable corruption.
|
||||||
- Reload GlobalGroups when you perform a world load.
|
- Reload GlobalGroups when you perform a world load.
|
||||||
- Changed GlobalGroups to save/load before local groups in the scheduled data saving/loading
|
- Changed GlobalGroups to save/load before local groups in the scheduled data saving/loading
|
||||||
|
- Fix 'manucheckp' to correctly report if a permission is available from GroupManager or Bukkit.
|
@ -787,29 +787,29 @@ public class GroupManager extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
targetPlayer = this.getServer().getPlayer(auxUser.getName());
|
targetPlayer = this.getServer().getPlayer(auxUser.getName());
|
||||||
// VALIDANDO PERMISSAO
|
// VALIDANDO PERMISSAO
|
||||||
permissionResult = permissionHandler.checkFullUserPermission(auxUser, args[1]);
|
permissionResult = permissionHandler.checkFullGMPermission(auxUser, args[1], false);
|
||||||
|
|
||||||
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {
|
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {
|
||||||
|
//No permissions found in GM so fall through and check Bukkit.
|
||||||
sender.sendMessage(ChatColor.RED + "The player doesn't have access to that permission");
|
sender.sendMessage(ChatColor.RED + "The player doesn't have access to that permission");
|
||||||
sender.sendMessage(ChatColor.YELLOW + "SuperPerms reports Node: " + targetPlayer.hasPermission(args[1]));
|
|
||||||
return false;
|
} else {
|
||||||
}
|
// This permission was found in groupmanager.
|
||||||
// PARECE OK
|
if (permissionResult.owner instanceof User) {
|
||||||
// auxString =
|
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {
|
||||||
// permissionHandler.checkUserOnlyPermission(auxUser, args[1]);
|
sender.sendMessage(ChatColor.RED + "The user has directly a negation node for that permission.");
|
||||||
if (permissionResult.owner instanceof User) {
|
} else {
|
||||||
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {
|
sender.sendMessage(ChatColor.YELLOW + "The user has directly this permission.");
|
||||||
sender.sendMessage(ChatColor.RED + "The user has directly a negation node for that permission.");
|
}
|
||||||
} else {
|
sender.sendMessage(ChatColor.YELLOW + "Permission Node: " + permissionResult.accessLevel);
|
||||||
sender.sendMessage(ChatColor.YELLOW + "The user has directly this permission.");
|
} else if (permissionResult.owner instanceof Group) {
|
||||||
|
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "The user inherits a negation permission from group: " + permissionResult.owner.getName());
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(ChatColor.YELLOW + "The user inherits the permission from group: " + permissionResult.owner.getName());
|
||||||
|
}
|
||||||
|
sender.sendMessage(ChatColor.YELLOW + "Permission Node: " + permissionResult.accessLevel);
|
||||||
}
|
}
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Permission Node: " + permissionResult.accessLevel);
|
|
||||||
} else if (permissionResult.owner instanceof Group) {
|
|
||||||
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {
|
|
||||||
sender.sendMessage(ChatColor.RED + "The user inherits a negation permission from group: " + permissionResult.owner.getName());
|
|
||||||
} else {
|
|
||||||
sender.sendMessage(ChatColor.YELLOW + "The user inherits the permission from group: " + permissionResult.owner.getName());
|
|
||||||
}
|
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Permission Node: " + permissionResult.accessLevel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// superperms
|
// superperms
|
||||||
|
Loading…
Reference in New Issue
Block a user