Permalink
Browse files

Merge pull request #386 from Librazy/master

Delay ProcessPlayerEvent by one tick on bukkit onEnable
  • Loading branch information...
me4502 committed Sep 3, 2018
2 parents 8771173 + ee4259b commit 8e819f7a823e29fca68fca5f88d575ee7663aa90
@@ -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 8e819f7

Please sign in to comment.