mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-02 10:36:39 +00:00
Expand 'manwhois' to also list a users subgroups.
This commit is contained in:
parent
25bd91eb80
commit
1c0a5c49a5
2 changed files with 12 additions and 1 deletions
|
@ -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 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.
|
- 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).
|
- 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.
|
|
@ -1398,6 +1398,16 @@ public class GroupManager extends JavaPlugin {
|
||||||
// Seems OK
|
// Seems OK
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Name: " + ChatColor.GREEN + auxUser.getName());
|
sender.sendMessage(ChatColor.YELLOW + "Name: " + ChatColor.GREEN + auxUser.getName());
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Group: " + ChatColor.GREEN + auxUser.getGroup().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()));
|
sender.sendMessage(ChatColor.YELLOW + "Overloaded: " + ChatColor.GREEN + dataHolder.isOverloaded(auxUser.getName()));
|
||||||
auxGroup = dataHolder.surpassOverload(auxUser.getName()).getGroup();
|
auxGroup = dataHolder.surpassOverload(auxUser.getName()).getGroup();
|
||||||
if (!auxGroup.equals(auxUser.getGroup())) {
|
if (!auxGroup.equals(auxUser.getGroup())) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue