mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Entity: rewrite dbbe1f2d5c
for master
This commit is contained in:
@@ -1633,7 +1633,7 @@ abstract class Entity{
|
||||
*/
|
||||
public function spawnTo(Player $player) : void{
|
||||
$id = spl_object_id($player);
|
||||
if(!isset($this->hasSpawned[$id])){
|
||||
if(!isset($this->hasSpawned[$id]) and $player->isUsingChunk($this->location->getFloorX() >> 4, $this->location->getFloorZ() >> 4)){
|
||||
$this->hasSpawned[$id] = $player;
|
||||
|
||||
$this->sendSpawnPacket($player);
|
||||
|
Reference in New Issue
Block a user