summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java9
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java7
2 files changed, 9 insertions, 7 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java
index e7fa81627..8e2df5d10 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java
@@ -44,12 +44,13 @@ public class OverloadedWorldHolder extends WorldDataHolder {
@Override
public User getUser(String userName) {
//OVERLOADED CODE
- if (overloadedUsers.containsKey(userName.toLowerCase())) {
- return overloadedUsers.get(userName.toLowerCase());
+ String userNameLowered = userName.toLowerCase();
+ if (overloadedUsers.containsKey(userNameLowered)) {
+ return overloadedUsers.get(userNameLowered);
}
//END CODE
- if (users.containsKey(userName.toLowerCase())) {
- return users.get(userName.toLowerCase());
+ if (users.containsKey(userNameLowered)) {
+ return users.get(userNameLowered);
}
User newUser = createUser(userName);
haveUsersChanged = true;
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
index 6544bb1cc..25eaf8526 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
@@ -268,9 +268,10 @@ public class WorldsHolder {
* @return OverloadedWorldHolder
*/
public OverloadedWorldHolder getWorldData(String worldName) {
- OverloadedWorldHolder data = worldsData.get(worldName.toLowerCase());
- if (mirrors.containsKey(worldName.toLowerCase())) {
- String realOne = mirrors.get(worldName.toLowerCase());
+ String worldNameLowered = worldName.toLowerCase();
+ OverloadedWorldHolder data = worldsData.get(worldNameLowered);
+ if (mirrors.containsKey(worldNameLowered)) {
+ String realOne = mirrors.get(worldNameLowered);
data = worldsData.get(realOne.toLowerCase());
}
if (data == null) {