pocketmine\level\Level::isSpawnChunk PHP Method

isSpawnChunk() public method

Returns true if the spawn is part of the spawn
public isSpawnChunk ( integer $X, integer $Z ) : boolean
$X integer
$Z integer
return boolean
    public function isSpawnChunk(int $X, int $Z) : bool
    {
        $spawnX = $this->provider->getSpawn()->getX() >> 4;
        $spawnZ = $this->provider->getSpawn()->getZ() >> 4;
        return abs($X - $spawnX) <= 1 and abs($Z - $spawnZ) <= 1;
    }
Level