1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-10-03 01:21:56 +02:00

Changed the way events are raised to prevent variable corruption.

This commit is contained in:
ElgarL
2011-12-29 14:52:42 +00:00
parent 69847af08a
commit 3aba996e97
4 changed files with 26 additions and 26 deletions

View File

@@ -1837,25 +1837,6 @@ public class GroupManager extends JavaPlugin {
return match;
}
/**
* 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(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.");
}
/**
* @return the config