Expand 'manwhois' to also list a users subgroups.

This commit is contained in:
ElgarL 2012-04-07 11:47:07 +01:00
parent 25bd91eb80
commit 1c0a5c49a5
2 changed files with 12 additions and 1 deletions

View file

@ -165,4 +165,5 @@ v 2.0:
- Fix GM reporting of permission inheritance to retain the correct order. Lower inheritance groups can no longer negate a higher groups permissions.
- Fix an error I caused trying to modify an unmodifiable list when parsing '*' permissions.
- Don't throw errors when attempting to remove permission attachments (bukkit will have already removed it).
- Remove all permission attachments when performing a manload or restart.
- Remove all permission attachments when performing a manload or restart.
- Expand 'manwhois' to also list a users subgroups.

View file

@ -1398,6 +1398,16 @@ public class GroupManager extends JavaPlugin {
// Seems OK
sender.sendMessage(ChatColor.YELLOW + "Name: " + ChatColor.GREEN + auxUser.getName());
sender.sendMessage(ChatColor.YELLOW + "Group: " + ChatColor.GREEN + auxUser.getGroup().getName());
// Compile a list of subgroups
auxString = "";
for (String subGroup : auxUser.subGroupListStringCopy()) {
auxString += subGroup + ", ";
}
if (auxString.lastIndexOf(",") > 0) {
auxString = auxString.substring(0, auxString.lastIndexOf(","));
sender.sendMessage(ChatColor.YELLOW + "subgroups: " + auxString);
}
sender.sendMessage(ChatColor.YELLOW + "Overloaded: " + ChatColor.GREEN + dataHolder.isOverloaded(auxUser.getName()));
auxGroup = dataHolder.surpassOverload(auxUser.getName()).getGroup();
if (!auxGroup.equals(auxUser.getGroup())) {