I use this code:
@EventHandler
public void onRespaw(PlayerRespawnEvent event) {
event.getplayer().spigot().respawn();
}
And when a player die, the server crash with no error.
I use this code:
@EventHandler
public void onRespaw(PlayerRespawnEvent event) {
event.getplayer().spigot().respawn();
}
And when a player die, the server crash with no error.