pocketmine\tile\Chest::isPaired PHP Méthode

isPaired() public méthode

public isPaired ( )
    public function isPaired()
    {
        if (!isset($this->namedtag->pairx) or !isset($this->namedtag->pairz)) {
            return false;
        }
        return true;
    }

Usage Example

Exemple #1
0
 public function pairWith(Chest $tile)
 {
     if ($this->isPaired() or $tile->isPaired()) {
         return false;
     }
     $this->namedtag->pairx = new Int("pairx", $tile->x);
     $this->namedtag->pairz = new Int("pairz", $tile->z);
     $tile->namedtag->pairx = new Int("pairx", $this->x);
     $tile->namedtag->pairz = new Int("pairz", $this->z);
     $this->spawnToAll();
     $tile->spawnToAll();
     $this->checkPairing();
     return true;
 }
All Usage Examples Of pocketmine\tile\Chest::isPaired