diff options
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 15 |
2 files changed, 14 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 2c38acf1b..7c10cc3ac 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -172,4 +172,5 @@ v 2.0: - Added missing confirmation message on '/manload'.
- Stop the error on shutdown if GM failed to load at startup.
- GroupManager will now generate it's own log (in the GM folder) to keep things tidy, but also to account of those players unable to find/access their server.log.
- - Startup errors will now lock out ALL commands other than '/manload'
\ No newline at end of file + - Startup errors will now lock out ALL commands other than '/manload'
+ - Fix 'manuadd' to use the default or selected world (via 'manselect'), if the world is not specified in the command.
\ 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 b39b640a4..1177e3357 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -457,9 +457,18 @@ public class GroupManager extends JavaPlugin { sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group> | optional [world])"); return false; } - // Select the relevant world - dataHolder = worldsHolder.getWorldData((args.length == 3)? args[2]:Bukkit.getWorlds().get(0).getName()); - permissionHandler = dataHolder.getPermissionsHandler(); + + // Select the relevant world (if specified) + if (args.length == 3) { + dataHolder = worldsHolder.getWorldData(args[2]); + permissionHandler = dataHolder.getPermissionsHandler(); + } + + // Validating state of sender + if (dataHolder == null || permissionHandler == null) { + if (!setDefaultWorldHandler(sender)) + return true; + } if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) { return false; |