mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
Implement respawn API.
By: ninja- <xninja@openmailbox.org>
This commit is contained in:
parent
a702945c70
commit
9e02bc055b
@ -2343,6 +2343,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Spigot start
|
||||
private final Player.Spigot spigot = new Player.Spigot()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void respawn()
|
||||
{
|
||||
if ( CraftPlayer.this.getHealth() <= 0 && CraftPlayer.this.isOnline() )
|
||||
{
|
||||
CraftPlayer.this.server.getServer().getPlayerList().respawn( CraftPlayer.this.getHandle(), false, Entity.RemovalReason.KILLED, org.bukkit.event.player.PlayerRespawnEvent.RespawnReason.PLUGIN );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public Player.Spigot spigot()
|
||||
|
Loading…
Reference in New Issue
Block a user