summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java12
2 files changed, 8 insertions, 7 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 64c9d98b3..f7c66782a 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -218,4 +218,5 @@ v 2.0:
- Added a new mirroring option in the config of 'all_unnamed_worlds'. This will cause all new or unnamed worlds to use this mirroring.
- Don't allow adding a node with '/manuaddp' and '/mangaddp' which is already negated.
- Warn when adding a node where an exception already exist.
- - Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are exact matches (not wildcards). \ No newline at end of file
+ - Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are exact matches (not wildcards).
+ - Store worldSelection indexed on the senders name rather than the object (fixes commandblocks using manselect). \ 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 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;
}