diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-04-07 11:47:07 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-04-07 11:47:07 +0100 |
commit | 1c0a5c49a5c1ecd0708823034b0c8726c965cb16 (patch) | |
tree | 9adc4bb8d8413dfef7c3640667296fc6b138436a /EssentialsGroupManager | |
parent | 25bd91eb807e19db9d045c8e5f4ee70ec085da33 (diff) | |
download | Essentials-1c0a5c49a5c1ecd0708823034b0c8726c965cb16.tar Essentials-1c0a5c49a5c1ecd0708823034b0c8726c965cb16.tar.gz Essentials-1c0a5c49a5c1ecd0708823034b0c8726c965cb16.tar.lz Essentials-1c0a5c49a5c1ecd0708823034b0c8726c965cb16.tar.xz Essentials-1c0a5c49a5c1ecd0708823034b0c8726c965cb16.zip |
Expand 'manwhois' to also list a users subgroups.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index a9355e608..42b7b989c 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -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.
\ No newline at end of file + - Remove all permission attachments when performing a manload or restart.
+ - Expand 'manwhois' to also list a users subgroups.
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index d1c62d4de..76babb1ec 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -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())) { |