From 7726fd0081346b59e4c555476f6c62e1aa38b69f Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 3 Jan 2012 02:04:48 +0000 Subject: Reload GlobalGroups when you perform a world load. Changed GlobalGroups to save/load before local groups in the scheduled data saving/loading --- .../groupmanager/dataholder/worlds/WorldsHolder.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java index 25eaf8526..dbdd17f34 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java @@ -176,6 +176,16 @@ public class WorldsHolder { ArrayList alreadyDone = new ArrayList(); Tasks.removeOldFiles(plugin, plugin.getBackupFolder()); + // Write Global Groups + if (GroupManager.getGlobalGroups().haveGroupsChanged()) { + GroupManager.getGlobalGroups().writeGroups(overwrite); + } else { + if (GroupManager.getGlobalGroups().getTimeStampGroups() < GroupManager.getGlobalGroups().getGlobalGroupsFile().lastModified()) { + System.out.print("Newer GlobalGroups file found (Loading changes)!"); + GroupManager.getGlobalGroups().load(); + } + } + for (OverloadedWorldHolder w : worldsData.values()) { if (alreadyDone.contains(w)) { continue; @@ -228,15 +238,6 @@ public class WorldsHolder { } alreadyDone.add(w); } - // Write Global Groups - if (GroupManager.getGlobalGroups().haveGroupsChanged()) { - GroupManager.getGlobalGroups().writeGroups(overwrite); - } else { - if (GroupManager.getGlobalGroups().getTimeStampGroups() < GroupManager.getGlobalGroups().getGlobalGroupsFile().lastModified()) { - System.out.print("Newer GlobalGroups file found (Loading changes)!"); - GroupManager.getGlobalGroups().load(); - } - } } /** -- cgit v1.2.3