mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Entity: rewrite dbbe1f2d5c04059ee9ddad12a0d33fbaea933683 for master
This commit is contained in:
parent
54c2778e56
commit
5b91be81cc
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user