From 09d502646738c362b62acc086d0d8cb7cc11e1b4 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Mon, 25 Feb 2013 13:49:18 +0000 Subject: Store worldSelection indexed on the senders name rather than the object (fixes commandblocks using manselect). --- .../src/org/anjocaido/groupmanager/GroupManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'EssentialsGroupManager/src/org/anjocaido') 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> overloadedUsers = new HashMap>(); - private Map selectedWorlds = new HashMap(); + private Map selectedWorlds = new HashMap(); private WorldsHolder worldsHolder; private boolean validateOnlinePlayer = true; @@ -142,7 +142,7 @@ public class GroupManager extends JavaPlugin { * reset local variables. */ overloadedUsers = new HashMap>(); - selectedWorlds = new HashMap(); + selectedWorlds = new HashMap(); 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; } -- cgit v1.2.3