summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-01-10 18:40:34 +0000
committerElgarL <ElgarL@palmergames.com>2012-01-10 18:40:34 +0000
commit2a478fe03d97c97eeb189f90721724ec6d7fcad5 (patch)
tree1804878a902a5803e511d5ea68aa5bd7437b873e /EssentialsGroupManager/src/org/anjocaido
parent58057a771d4e8e971d8531e1ad208eb6bbb0df54 (diff)
downloadEssentials-2a478fe03d97c97eeb189f90721724ec6d7fcad5.tar
Essentials-2a478fe03d97c97eeb189f90721724ec6d7fcad5.tar.gz
Essentials-2a478fe03d97c97eeb189f90721724ec6d7fcad5.tar.lz
Essentials-2a478fe03d97c97eeb189f90721724ec6d7fcad5.tar.xz
Essentials-2a478fe03d97c97eeb189f90721724ec6d7fcad5.zip
Optimize fetching of Mirrored world data.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
index dbdd17f34..49205e4fb 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
@@ -270,11 +270,12 @@ public class WorldsHolder {
*/
public OverloadedWorldHolder getWorldData(String worldName) {
String worldNameLowered = worldName.toLowerCase();
- OverloadedWorldHolder data = worldsData.get(worldNameLowered);
+ // If a mirror change to the real world to load.
if (mirrors.containsKey(worldNameLowered)) {
- String realOne = mirrors.get(worldNameLowered);
- data = worldsData.get(realOne.toLowerCase());
- }
+ worldNameLowered = mirrors.get(worldNameLowered);
+ }
+ OverloadedWorldHolder data = worldsData.get(worldNameLowered);
+
if (data == null) {
GroupManager.logger.finest("Requested world " + worldName + " not found or badly mirrored. Returning default world...");
data = getDefaultWorld();
@@ -283,8 +284,9 @@ public class WorldsHolder {
}
/**
- * Do a matching of playerName, if it s found only one player, do
+ * Do a matching of playerName, if its found only one player, do
* getWorldData(player)
+ *
* @param playerName
* @return null if matching returned no player, or more than one.
*/