mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-25 01:21:26 +01:00
Delayed GroupManager events so Superperms will be fully updated before
plugins receive the events.
This commit is contained in:
parent
a2202439bb
commit
debcf4714a
@ -92,3 +92,4 @@ v 1.8:
|
|||||||
- Fixed 'manucheckp' returning a null for the searched node when it's a group/subgroup.
|
- 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.
|
- 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.
|
- Expanded GlobalGroups.yml and Groups.yml to include Towny permissions.
|
||||||
|
- Delayed GroupManager events so Superperms will be fully updated before plugins receive the events.
|
@ -1840,12 +1840,22 @@ public class GroupManager extends JavaPlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggers all GroupManager events for other plugins to see.
|
* 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
|
* @param event
|
||||||
*/
|
*/
|
||||||
public static void callEvent(GroupManagerEvent 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);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
}
|
}
|
||||||
|
}) == -1)
|
||||||
|
GroupManager.logger.warning("Could not schedule GM Event.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the config
|
* @return the config
|
||||||
|
Loading…
Reference in New Issue
Block a user