mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-24 00:51:22 +01:00
Cleanup session loading.
Apparently the spigot server stores time-lock between logout and login, but not weather-lock. This should work around any such issues by re-applying handlers on login.
This commit is contained in:
parent
96e7c43f56
commit
1f1e6eedf6
@ -151,8 +151,6 @@ public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
}
|
||||
|
||||
Events.fire(new ProcessPlayerEvent(player));
|
||||
|
||||
WorldGuard.getInstance().getPlatform().getSessionManager().get(localPlayer); // Initializes a session
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
|
@ -59,13 +59,15 @@ public void resetAllStates() {
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
// Pre-load a session
|
||||
get(WorldGuardPlugin.inst().wrapPlayer(event.getPlayer()));
|
||||
LocalPlayer player = WorldGuardPlugin.inst().wrapPlayer(event.getPlayer());
|
||||
get(player).initialize(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
|
||||
get(new BukkitPlayer(WorldGuardPlugin.inst(), player)).tick(new BukkitPlayer(WorldGuardPlugin.inst(), player));
|
||||
LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player);
|
||||
get(localPlayer).tick(localPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user