/** * Destroy a sign * @param Sign $tile - sign tile */ public static function breakSign(Sign $tile) { $l = $tile->getLevel(); $l->setBlockIdAt($tile->getX(), $tile->getY(), $tile->getZ(), Block::AIR); $l->setBlockDataAt($tile->getX(), $tile->getY(), $tile->getZ(), 0); $tile->close(); }
/** * Add a new 1vs1 sign */ public function addSign(Sign $signTile) { $signs = $this->config->signs; $signs[count($this->signTiles)] = [$signTile->getX(), $signTile->getY(), $signTile->getZ(), $signTile->getLevel()->getName()]; $this->config->set("signs", $signs); $this->config->save(); array_push($this->signTiles, $signTile); }