summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-04-10 20:48:34 +0100
committerElgarL <ElgarL@palmergames.com>2012-04-10 20:48:34 +0100
commitcd24ffbadac6c48931f5ff33457950103b0e62da (patch)
tree4d4c9d2636d6072d51630b64fd971691d927a8bd /EssentialsGroupManager/src
parentcdae0898c7848d9d0c3717eb1cacf9fc9bb8a199 (diff)
downloadEssentials-cd24ffbadac6c48931f5ff33457950103b0e62da.tar
Essentials-cd24ffbadac6c48931f5ff33457950103b0e62da.tar.gz
Essentials-cd24ffbadac6c48931f5ff33457950103b0e62da.tar.lz
Essentials-cd24ffbadac6c48931f5ff33457950103b0e62da.tar.xz
Essentials-cd24ffbadac6c48931f5ff33457950103b0e62da.zip
Fix 'manuadd' to use the default or selected world (via 'manselect'), if
the world is not specified in the command.
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java15
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;