summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-06-24 13:10:22 +0100
committerElgarL <ElgarL@palmergames.com>2012-06-24 13:10:22 +0100
commit51d61e7a915aa86d4291516dede211ec454c630f (patch)
treed72d77f5b263285b349cb50b1219ff93f69d5a06 /EssentialsGroupManager
parent656f25dc97f6b094b86131263d17a6d8069370f7 (diff)
downloadEssentials-51d61e7a915aa86d4291516dede211ec454c630f.tar
Essentials-51d61e7a915aa86d4291516dede211ec454c630f.tar.gz
Essentials-51d61e7a915aa86d4291516dede211ec454c630f.tar.lz
Essentials-51d61e7a915aa86d4291516dede211ec454c630f.tar.xz
Essentials-51d61e7a915aa86d4291516dede211ec454c630f.zip
Fix loading users with only numerals in their names to be seen as
strings.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java10
2 files changed, 10 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 134d40250..3b44270c6 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -184,4 +184,5 @@ v 2.0:
- Prevent null perms getting past the GlobalGroups loader.
- Fix forgetting sub groups on a manload.
- Allow 'manucheckp' to notify when superperms reports false but it is really negated.
- - Only output a Data update message if something has changed. \ No newline at end of file
+ - Only output a Data update message if something has changed.
+ - Fix loading users with only numerals in their names to be seen as strings. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index fefc698f9..1ccd48772 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -775,20 +775,26 @@ public class WorldDataHolder {
Iterator<String> usersItr = allUsersNode.keySet().iterator();
String usersKey;
+ Object node;
Integer userCount = 0;
while (usersItr.hasNext()) {
try {
userCount++;
// Attempt to fetch the next user name.
- usersKey = usersItr.next();
+ node = usersItr.next();
+ if (node instanceof Integer)
+ usersKey = Integer.toString((Integer)node);
+ else
+ usersKey = node.toString();
+
} catch (Exception ex) {
throw new IllegalArgumentException("Invalid node type for user entry (" + userCount + ") in file: " + usersFile.getPath(), ex);
}
Map<String, Object> thisUserNode = null;
try {
- thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
+ thisUserNode = (Map<String, Object>) allUsersNode.get(node);
} catch (Exception ex) {
throw new IllegalArgumentException("Bad format found for user: " + usersKey + " in file: " + usersFile.getPath());
}