diff options
author | ElgarL <ElgarL@palmergames.com> | 2011-12-20 17:21:55 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2011-12-20 17:21:55 +0000 |
commit | debcf4714a3db9065219e3701137e8dea6439970 (patch) | |
tree | 4bff82b908809d40f70396a5c3916440eb639eaa /EssentialsGroupManager/src | |
parent | a2202439bb1aeddaaad08c3b6607ce11b98356f3 (diff) | |
download | Essentials-debcf4714a3db9065219e3701137e8dea6439970.tar Essentials-debcf4714a3db9065219e3701137e8dea6439970.tar.gz Essentials-debcf4714a3db9065219e3701137e8dea6439970.tar.lz Essentials-debcf4714a3db9065219e3701137e8dea6439970.tar.xz Essentials-debcf4714a3db9065219e3701137e8dea6439970.zip |
Delayed GroupManager events so Superperms will be fully updated before
plugins receive the events.
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 14 |
2 files changed, 14 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 6611c3e1b..dc661f7c3 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -91,4 +91,5 @@ v 1.8: - Changed ServicesManager registration to lowest from normal.
- Fixed 'manucheckp' returning a null for the searched node when it's a group/subgroup.
- 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.
\ No newline at end of file + - Expanded GlobalGroups.yml and Groups.yml to include Towny permissions.
+ - Delayed GroupManager events so Superperms will be fully updated before plugins receive the events.
\ 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 9762a35a7..5ced1fb47 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -1840,11 +1840,21 @@ public class GroupManager extends JavaPlugin { /** * Triggers all GroupManager events for other plugins to see. + * Schedules events for 1 tick later to allow GM to finish populating super perms. * * @param event */ - public static void callEvent(GroupManagerEvent event) { - Bukkit.getServer().getPluginManager().callEvent(event); + public static void callEvent(final GroupManagerEvent event) { + + if (Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("GroupManager"), new Runnable() { + + @Override + public void run() { + Bukkit.getServer().getPluginManager().callEvent(event); + } + }) == -1) + GroupManager.logger.warning("Could not schedule GM Event."); + } /** |