summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2013-02-25 13:49:18 +0000
committerElgarL <ElgarL@palmergames.com>2013-02-25 13:49:18 +0000
commitcc83553d7286691377a3b41417ef5ddb7effae69 (patch)
tree8b0b0295cd5b7c51ffc502f9b9e95e4efbace2c8 /EssentialsGroupManager/src/org/anjocaido
parent643a9be9858c2d3292f7758124278a06f12496d9 (diff)
downloadEssentials-cc83553d7286691377a3b41417ef5ddb7effae69.tar
Essentials-cc83553d7286691377a3b41417ef5ddb7effae69.tar.gz
Essentials-cc83553d7286691377a3b41417ef5ddb7effae69.tar.lz
Essentials-cc83553d7286691377a3b41417ef5ddb7effae69.tar.xz
Essentials-cc83553d7286691377a3b41417ef5ddb7effae69.zip
Store worldSelection indexed on the senders name rather than the object
(fixes commandblocks using manselect).
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java12
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;
}