PHP: $spawn = $this->getServer()->getDefaultLevel()->getSafeSpawn(); $pk = new SetSpawnPositionPacket(); $pk->x = $spawn->getX(); $pk->y = $spawn->getY(); $pk->z = $spawn->getZ(); $player->dataPacket($pk);
You can use Player::setSpawn(). PHP: /** @var Player $player *//** @var Vector3 $pos */$player->setSpawn($pos);