PHP: $player->setSpawn(new Position($x, $y, $z, $level)); When the player dies, he returns to the spawn point that you added.