use of com.sk89q.worldguard.bukkit.BukkitPlayer in project WorldGuard by EngineHub.
the class BukkitSessionManager method resetAllStates.
/**
* Re-initialize handlers and clear "last position," "last state," etc.
* information for all players.
*/
@Override
public void resetAllStates() {
Collection<? extends Player> players = Bukkit.getServer().getOnlinePlayers();
for (Player player : players) {
BukkitPlayer bukkitPlayer = new BukkitPlayer(WorldGuardPlugin.inst(), player);
Session session = getIfPresent(bukkitPlayer);
if (session != null) {
session.resetState(bukkitPlayer);
}
}
}
Aggregations