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:
@@ -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
|
||||
|
Reference in New Issue
Block a user