mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +00:00
parent
7bee72ef2d
commit
aeab19a616
@ -2258,6 +2258,11 @@ class World implements ChunkManager{
|
|||||||
$previousSpawn = $this->getSpawnLocation();
|
$previousSpawn = $this->getSpawnLocation();
|
||||||
$this->provider->getWorldData()->setSpawn($pos);
|
$this->provider->getWorldData()->setSpawn($pos);
|
||||||
(new SpawnChangeEvent($this, $previousSpawn))->call();
|
(new SpawnChangeEvent($this, $previousSpawn))->call();
|
||||||
|
|
||||||
|
$location = Position::fromObject($pos, $this);
|
||||||
|
foreach($this->players as $player){
|
||||||
|
$player->getNetworkSession()->syncWorldSpawnPoint($location);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user