Permalink
Browse files

Delay ProcessPlayerEvent by one tick, allowing other plugin to regist…

…er their Handlers when /reload
  • Loading branch information...
Librazy committed Aug 30, 2018
1 parent 8771173 commit ee4259b88d1becf85ab46a6dc3be87a0ff5fea42
@@ -212,10 +212,12 @@ public void onEnable() {
}
worldListener.registerEvents();
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
ProcessPlayerEvent event = new ProcessPlayerEvent(player);
Events.fire(event);
}
Bukkit.getScheduler().runTask(this, () -> {
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
ProcessPlayerEvent event = new ProcessPlayerEvent(player);
Events.fire(event);
}
});
((SimpleFlagRegistry) WorldGuard.getInstance().getFlagRegistry()).setInitialized(true);
}

0 comments on commit ee4259b

Please sign in to comment.