Added '/mancheckw <world>' to inspect what permission files a world is

referencing.
This commit is contained in:
ElgarL 2013-01-29 16:33:20 +00:00
parent e9e9efd2d7
commit 7fc4a75d4d
3 changed files with 31 additions and 3 deletions

View File

@ -210,4 +210,5 @@ v 2.0:
- Do not grant any permissions (nor update Bukkit) if the server is in offline mode and the player has the permission node 'groupmanager.noofflineperms'.
- Negate 'groupmanager.noofflineperms' by default in the owner group.
- Add support for BukkitForge using 'overworld' as the main world name.
- Prevent '*' permissions granting the 'groupmanager.noofflineperms' permission.
- Prevent '*' permissions granting the 'groupmanager.noofflineperms' permission.
- Added '/mancheckw <world>' to inspect what permission files a world is referencing.

View File

@ -1895,7 +1895,7 @@ public class GroupManager extends JavaPlugin {
case manselect:
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <world>)");
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/manselect <world>)");
sender.sendMessage(ChatColor.YELLOW + "Worlds available: ");
ArrayList<OverloadedWorldHolder> worlds = worldsHolder.allWorldsDataList();
auxString = "";
@ -1935,6 +1935,32 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.YELLOW + "You have removed your world selection. Working with current world(if possible).");
return true;
case mancheckw:
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/mancheckw <world>)");
sender.sendMessage(ChatColor.YELLOW + "Worlds available: ");
ArrayList<OverloadedWorldHolder> worlds = worldsHolder.allWorldsDataList();
auxString = "";
for (int i = 0; i < worlds.size(); i++) {
auxString += worlds.get(i).getName();
if ((i + 1) < worlds.size()) {
auxString += ", ";
}
}
sender.sendMessage(ChatColor.YELLOW + auxString);
return false;
}
dataHolder = worldsHolder.getWorldData(auxString);
sender.sendMessage(ChatColor.YELLOW + "You have selected world '" + dataHolder.getName() + "'.");
sender.sendMessage(ChatColor.YELLOW + "This world is using the following data files..");
sender.sendMessage(ChatColor.YELLOW + "Groups: " + dataHolder.getGroupsFile().getAbsolutePath());
sender.sendMessage(ChatColor.YELLOW + "Users: " + dataHolder.getUsersFile().getAbsolutePath());
return true;
default:
break;

View File

@ -49,5 +49,6 @@ public enum GroupManagerPermissions {
mantogglesave,
manworld,
manselect,
manclear
manclear,
mancheckw
}