pocketmine\tile\Chest::pairWith PHP Method

pairWith() public method

public pairWith ( Chest $tile )
$tile Chest
    public function pairWith(Chest $tile)
    {
        if ($this->isPaired() or $tile->isPaired()) {
            return false;
        }
        $this->createPair($tile);
        $this->spawnToAll();
        $tile->spawnToAll();
        $this->checkPairing();
        return true;
    }