diff options
author | ElgarL <ElgarL@palmergames.com> | 2013-02-22 12:39:41 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2013-02-22 12:39:41 +0000 |
commit | 90730f63d5e1fbd5cef2cd9d856ea651d2a79bac (patch) | |
tree | 88bca9e38f9010d745aadd82263357987d376b31 /EssentialsGroupManager/src/org/anjocaido/groupmanager/events | |
parent | 13e07f64ecae02f002ac5a94ab7b39a2b4059718 (diff) | |
download | Essentials-90730f63d5e1fbd5cef2cd9d856ea651d2a79bac.tar Essentials-90730f63d5e1fbd5cef2cd9d856ea651d2a79bac.tar.gz Essentials-90730f63d5e1fbd5cef2cd9d856ea651d2a79bac.tar.lz Essentials-90730f63d5e1fbd5cef2cd9d856ea651d2a79bac.tar.xz Essentials-90730f63d5e1fbd5cef2cd9d856ea651d2a79bac.zip |
Added a new mirroring option in the config of 'all_unnamed_worlds'. This
will cause all new or unnamed worlds to use this mirroring.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/events')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMWorldListener.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMWorldListener.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMWorldListener.java index f7a7109ab..f89a70c4a 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMWorldListener.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMWorldListener.java @@ -35,8 +35,24 @@ public class GMWorldListener implements Listener { if (GroupManager.isLoaded() && !plugin.getWorldsHolder().isInList(worldName)) {
GroupManager.logger.info("New world detected...");
GroupManager.logger.info("Creating data for: " + worldName);
+
+ if (plugin.getWorldsHolder().getWorldData("all_unnamed_worlds") != null) {
+
+ String usersMirror = plugin.getWorldsHolder().getMirrorsUser().get("all_unnamed_worlds");
+ String groupsMirror = plugin.getWorldsHolder().getMirrorsGroup().get("all_unnamed_worlds");
+
+ if (usersMirror != null)
+ plugin.getWorldsHolder().getMirrorsUser().put(worldName.toLowerCase(), usersMirror);
+
+ if (groupsMirror != null)
+ plugin.getWorldsHolder().getMirrorsGroup().put(worldName.toLowerCase(), groupsMirror);
+
+ }
+
plugin.getWorldsHolder().setupWorldFolder(worldName);
plugin.getWorldsHolder().loadWorld(worldName);
+
+
if (plugin.getWorldsHolder().isInList(worldName)) {
GroupManager.logger.info("Don't forget to configure/mirror this world in config.yml.");
} else
|