mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 08:06:54 +02:00
Expand 'manwhois' to also list a users subgroups.
This commit is contained in:
@@ -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())) {
|
||||||
|
Reference in New Issue
Block a user