mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-10 21:10:16 +01:00
Possible fix duplicate initialization;
Remove over-parallelism; (cherry picked from commit e1861e68dc28469a2654bb29a0757769b8c845a0)
This commit is contained in:
parent
ce7b623c71
commit
4b5dc2ec3c
@ -210,14 +210,12 @@ public void onEnable() {
|
||||
}
|
||||
worldListener.registerEvents();
|
||||
|
||||
getScheduler().runAsync(() -> {
|
||||
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
|
||||
getScheduler().runAtEntity(player, () -> {
|
||||
ProcessPlayerEvent event = new ProcessPlayerEvent(player);
|
||||
Events.fire(event);
|
||||
});
|
||||
}
|
||||
});
|
||||
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
|
||||
getScheduler().executeAtEntity(player, () -> {
|
||||
ProcessPlayerEvent event = new ProcessPlayerEvent(player);
|
||||
Events.fire(event);
|
||||
});
|
||||
}
|
||||
|
||||
((SimpleFlagRegistry) WorldGuard.getInstance().getFlagRegistry()).setInitialized(true);
|
||||
((SimpleDomainRegistry) WorldGuard.getInstance().getDomainRegistry()).setInitialized(true);
|
||||
|
@ -60,8 +60,7 @@ public void resetAllStates() {
|
||||
@EventHandler
|
||||
public void onPlayerProcess(ProcessPlayerEvent event) {
|
||||
// Pre-load a session
|
||||
LocalPlayer player = WorldGuardPlugin.inst().wrapPlayer(event.getPlayer());
|
||||
get(player).initialize(player);
|
||||
get(WorldGuardPlugin.inst().wrapPlayer(event.getPlayer()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user