summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2013-02-22 13:17:58 +0000
committerElgarL <ElgarL@palmergames.com>2013-02-22 13:17:58 +0000
commitf9b5d74f6d7b2571035698547b6e3779ce6d077e (patch)
tree5a06659c3ddb8840616b76eb55c3f078e3231af8 /EssentialsGroupManager
parent8960417d562dadf3f3ef5617bfb9b25b82dfe397 (diff)
downloadEssentials-f9b5d74f6d7b2571035698547b6e3779ce6d077e.tar
Essentials-f9b5d74f6d7b2571035698547b6e3779ce6d077e.tar.gz
Essentials-f9b5d74f6d7b2571035698547b6e3779ce6d077e.tar.lz
Essentials-f9b5d74f6d7b2571035698547b6e3779ce6d077e.tar.xz
Essentials-f9b5d74f6d7b2571035698547b6e3779ce6d077e.zip
Do not list "all_unnamed_worlds" as a selectable world.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java51
1 files changed, 27 insertions, 24 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
index 2553b3bc3..bf84bce4c 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
@@ -745,39 +745,42 @@ public class WorldsHolder {
for (String world : worldsData.keySet()) {
- // Fetch the relevant world object
- OverloadedWorldHolder data = getWorldData(world);
+ if (!world.equalsIgnoreCase("all_unnamed_worlds")) {
+
+ // Fetch the relevant world object
+ OverloadedWorldHolder data = getWorldData(world);
+
+ if (!list.contains(data)) {
- if (!list.contains(data)) {
+ String worldNameLowered = data.getName().toLowerCase();
+ String usersMirror = mirrorsUser.get(worldNameLowered);
+ String groupsMirror = mirrorsGroup.get(worldNameLowered);
- String worldNameLowered = data.getName().toLowerCase();
- String usersMirror = mirrorsUser.get(worldNameLowered);
- String groupsMirror = mirrorsGroup.get(worldNameLowered);
+ // is users mirrored?
+ if (usersMirror != null) {
- // is users mirrored?
- if (usersMirror != null) {
+ // If both are mirrored
+ if (groupsMirror != null) {
- // If both are mirrored
- if (groupsMirror != null) {
+ // if the data sources are the same, return the parent
+ if (usersMirror == groupsMirror) {
+ data = getWorldData(usersMirror.toLowerCase());
- // if the data sources are the same, return the parent
- if (usersMirror == groupsMirror) {
- data = getWorldData(usersMirror.toLowerCase());
-
- // Only add the parent if it's not already listed.
- if (!list.contains(data))
- list.add(data);
+ // Only add the parent if it's not already listed.
+ if (!list.contains(data))
+ list.add(data);
- continue;
+ continue;
+ }
+ // Both data sources are mirrors, but they are from different parents
+ // so fall through to add the actual data object.
}
- // Both data sources are mirrors, but they are from different parents
- // so fall through to add the actual data object.
+ // Groups isn't a mirror so fall through to add this this worlds data source
}
- // Groups isn't a mirror so fall through to add this this worlds data source
- }
- // users isn't mirrored so we need to add this worlds data source
- list.add(data);
+ // users isn't mirrored so we need to add this worlds data source
+ list.add(data);
+ }
}
}
return list;