use of pl.themolka.arcade.game.GamePlayer in project Arcade2 by ShootGame.
the class ArcadePlayer method respawn.
/**
* @deprecated Will not fire {@link pl.themolka.arcade.respawn.PlayerRespawnEvent}
* and {@link org.bukkit.event.player.PlayerRespawnEvent}!
*/
@Deprecated
public void respawn(Location at) {
// 'worldId' is not used if 'at' is null
int worldId = -1;
if (at != null) {
worldId = ((CraftWorld) at.getWorld()).getHandle().dimension;
}
GamePlayer gamePlayer = this.getGamePlayer();
if (gamePlayer != null) {
gamePlayer.resetHealth();
}
EntityPlayer mojang = this.getMojang();
if (mojang != null) {
mojang.server.getPlayerList().moveToWorld(mojang, worldId, false, at, false);
}
}
Aggregations