diff options
author | ElgarL <ElgarL@palmergames.com> | 2013-02-25 13:49:18 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2013-02-25 13:49:18 +0000 |
commit | f032c8451347dc9b061fdff26abb349ce212e108 (patch) | |
tree | 8f1ec08d132f7b05c61cfe95c676f4a2ee47d6af /EssentialsGroupManager/src/org | |
parent | 70aaf168e5d58dd53ec8b739d26189242534c815 (diff) | |
download | Essentials-f032c8451347dc9b061fdff26abb349ce212e108.tar Essentials-f032c8451347dc9b061fdff26abb349ce212e108.tar.gz Essentials-f032c8451347dc9b061fdff26abb349ce212e108.tar.lz Essentials-f032c8451347dc9b061fdff26abb349ce212e108.tar.xz Essentials-f032c8451347dc9b061fdff26abb349ce212e108.zip |
Store worldSelection indexed on the senders name rather than the object
(fixes commandblocks using manselect).
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index fbe0378d6..0e7f56d73 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -56,7 +56,7 @@ public class GroupManager extends JavaPlugin { private Runnable commiter; private ScheduledThreadPoolExecutor scheduler; private Map<String, ArrayList<User>> overloadedUsers = new HashMap<String, ArrayList<User>>(); - private Map<CommandSender, String> selectedWorlds = new HashMap<CommandSender, String>(); + private Map<String, String> selectedWorlds = new HashMap<String, String>(); private WorldsHolder worldsHolder; private boolean validateOnlinePlayer = true; @@ -142,7 +142,7 @@ public class GroupManager extends JavaPlugin { * reset local variables. */ overloadedUsers = new HashMap<String, ArrayList<User>>(); - selectedWorlds = new HashMap<CommandSender, String>(); + selectedWorlds = new HashMap<String, String>(); lastError = ""; /* @@ -431,7 +431,7 @@ public class GroupManager extends JavaPlugin { dataHolder = worldsHolder.getWorldData(senderPlayer); } - String selectedWorld = selectedWorlds.get(sender); + String selectedWorld = selectedWorlds.get(sender.getName()); if (selectedWorld != null) { dataHolder = worldsHolder.getWorldData(selectedWorld); } @@ -1950,7 +1950,7 @@ public class GroupManager extends JavaPlugin { } return true; case manworld: - auxString = selectedWorlds.get(sender); + auxString = selectedWorlds.get(sender.getName()); if (auxString != null) { sender.sendMessage(ChatColor.YELLOW + "You have the world '" + dataHolder.getName() + "' in your selection."); } else { @@ -1993,7 +1993,7 @@ public class GroupManager extends JavaPlugin { } dataHolder = worldsHolder.getWorldData(auxString); permissionHandler = dataHolder.getPermissionsHandler(); - selectedWorlds.put(sender, dataHolder.getName()); + selectedWorlds.put(sender.getName(), dataHolder.getName()); sender.sendMessage(ChatColor.YELLOW + "You have selected world '" + dataHolder.getName() + "'."); return true; @@ -2061,7 +2061,7 @@ public class GroupManager extends JavaPlugin { permissionHandler = dataHolder.getPermissionsHandler(); if ((dataHolder != null) && (permissionHandler != null)) { - selectedWorlds.put(sender, dataHolder.getName()); + selectedWorlds.put(sender.getName(), dataHolder.getName()); sender.sendMessage(ChatColor.RED + "Couldn't retrieve your world. Default world '" + worldsHolder.getDefaultWorld().getName() + "' selected."); return true; } |