Merge pull request #386 from Librazy/master

Delay ProcessPlayerEvent by one tick on bukkit onEnable
This commit is contained in:
Matthew Miller 2018-09-03 21:25:39 +10:00 committed by GitHub
commit 8e819f7a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,10 +212,12 @@ public void onEnable() {
}
worldListener.registerEvents();
Bukkit.getScheduler().runTask(this, () -> {
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
ProcessPlayerEvent event = new ProcessPlayerEvent(player);
Events.fire(event);
}
});
((SimpleFlagRegistry) WorldGuard.getInstance().getFlagRegistry()).setInitialized(true);
}