summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-04-16 23:54:33 +0100
committerElgarL <ElgarL@palmergames.com>2012-04-16 23:54:33 +0100
commitda857895fc2eea8449c98c64719fe1e32f54c80c (patch)
treeee4ce4808a56f9c12b4315d5163cb69497f7d856 /EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder
parent1599a36642014d2b3284288676999a39b417a841 (diff)
downloadEssentials-da857895fc2eea8449c98c64719fe1e32f54c80c.tar
Essentials-da857895fc2eea8449c98c64719fe1e32f54c80c.tar.gz
Essentials-da857895fc2eea8449c98c64719fe1e32f54c80c.tar.lz
Essentials-da857895fc2eea8449c98c64719fe1e32f54c80c.tar.xz
Essentials-da857895fc2eea8449c98c64719fe1e32f54c80c.zip
Re-initialize the WorldsHolder on a reload, as un-registering and
re-registering a new holder means all plugins have to check for the new service on every quiery.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
index 37d0a8430..a9ab4befa 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
@@ -57,12 +57,19 @@ public class WorldsHolder {
public WorldsHolder(GroupManager plugin) {
this.plugin = plugin;
+ resetWorldsHolder();
+ }
+
+ public void resetWorldsHolder() {
+
+ mirrorsGroup = new HashMap<String, String>();
+ mirrorsUser = new HashMap<String, String>();
+
// Setup folders and check files exist for the primary world
verifyFirstRun();
initialLoad();
- if (serverDefaultWorldName == null) {
+ if (serverDefaultWorldName == null)
throw new IllegalStateException("There is no default group! OMG!");
- }
}
private void initialLoad() {