diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-01-03 02:04:48 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-01-03 02:04:48 +0000 |
commit | 7726fd0081346b59e4c555476f6c62e1aa38b69f (patch) | |
tree | dd0901e72b8dbbba7f7094945ab626beaa57fd33 /EssentialsGroupManager/src | |
parent | 3aba996e97bd5bb90e65ed3166f3666d9122a729 (diff) | |
download | Essentials-7726fd0081346b59e4c555476f6c62e1aa38b69f.tar Essentials-7726fd0081346b59e4c555476f6c62e1aa38b69f.tar.gz Essentials-7726fd0081346b59e4c555476f6c62e1aa38b69f.tar.lz Essentials-7726fd0081346b59e4c555476f6c62e1aa38b69f.tar.xz Essentials-7726fd0081346b59e4c555476f6c62e1aa38b69f.zip |
Reload GlobalGroups when you perform a world load.
Changed GlobalGroups to save/load before local groups in the
scheduled data saving/loading
Diffstat (limited to 'EssentialsGroupManager/src')
3 files changed, 15 insertions, 10 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 3929b9d22..9b43fddbb 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -93,4 +93,6 @@ v 1.8: - manpromote and mandemote now correctly send the notification to the console if the command was issued there.
- Expanded GlobalGroups.yml and Groups.yml to include Towny permissions.
- Delayed GroupManager events so Superperms will be fully updated before plugins receive the events.
- - Changed the way events are raised to prevent variable corruption.
\ No newline at end of file + - Changed the way events are raised to prevent variable corruption.
+ - Reload GlobalGroups when you perform a world load.
+ - Changed GlobalGroups to save/load before local groups in the scheduled data saving/loading
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index c0e9ef2f8..16e0222d8 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -1504,7 +1504,9 @@ public class GroupManager extends JavaPlugin { isLoaded = false; // Disable Bukkit Perms update + globalGroups.load(); worldsHolder.loadWorld(auxString); + sender.sendMessage("The request to world '" + auxString + "' was sent."); isLoaded = true; 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<WorldDataHolder> alreadyDone = new ArrayList<WorldDataHolder>(); 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(); - } - } } /** |