Hello since this commit https://github.com/pmmp/PocketMine-MP/commit/0f79b19fdcc8934756b4cbc6994896c918b58788 my plugin gives these errors Code: Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'SW_svile v0.6dev': Argument 2 passed to pocketmine\level\format\Chunk::getTile() must be of the type integer, string given, called in C:\Users\PC\Desktop\GameCraftPE\Skywars\src\pocketmine\level\Level.php on line 1971 on svile\sw\SWlistener 2017-06-27 [18:18:30] [Server thread/CRITICAL]: TypeError: "Argument 2 passed to pocketmine\level\format\Chunk::getTile() must be of the type integer, string given, called in C:\Users\PC\Desktop\GameCraftPE\Skywars\src\pocketmine\level\Level.php on line 1971" (EXCEPTION) in "src/pocketmine/level/format/Chunk" at line 655 PHP: public function refreshSigns($all = true, $SWname = '', $players = 0, $slot = 0, $state = '§fTap to join') { if (!$all) { $ex = explode(':', array_search($SWname, $this->signs)); if (count($ex) == 0b100) { $this->getServer()->loadLevel($ex[0b11]); if ($this->getServer()->getLevelByName($ex[0b11]) != null) { $tile = $this->getServer()->getLevelByName($ex[0b11])->getTile(new Vector3($ex[0], $ex[1], $ex[2], $ex[0b10])); if ($tile != null && $tile instanceof Sign) { $text = $tile->getText(); $tile->setText($text[0], $text[1], TextFormat::GREEN . $players . TextFormat::BOLD . TextFormat::DARK_GRAY . '/' . TextFormat::RESET . TextFormat::GREEN . $slot, $state); } else { $this->getLogger()->critical('Can\'t get ' . $SWname . ' sign.Error finding sign on level: ' . $ex[0b11] . ' x:' . $ex[0] . ' y:' . $ex[1] . ' z:' . $ex[2]); } } } } else { foreach ($this->signs as $key => $val) { $ex = explode(':', $key); $this->getServer()->loadLevel($ex[0b11]); if ($this->getServer()->getLevelByName($ex[0b11]) instanceof \pocketmine\level\Level) { $tile = $this->getServer()->getLevelByName($ex[0b11])->getTile(new Vector3($ex[0], $ex[1], $ex[2])); if ($tile instanceof Sign) { $text = $tile->getText(); $tile->setText($text[0], $text[1], TextFormat::GREEN . $this->arenas[$val]->getSlot(true) . TextFormat::BOLD . TextFormat::DARK_GRAY . '/' . TextFormat::RESET . TextFormat::GREEN . $this->arenas[$val]->getSlot(), $text[3]); } else { $this->getLogger()->critical('Can\'t get ' . $val . ' sign.Error finding sign on level: ' . $ex[0b11] . ' x:' . $ex[0] . ' y:' . $ex[1] . ' z:' . $ex[2]); } } } } } this is the code of that function full plugin: https://github.com/GameCraftPE/Skywars-Core how to fix that?
PHP: public function onInteract(PlayerInteractEvent $ev) { if ($ev->getAction() !== PlayerInteractEvent::RIGHT_CLICK_BLOCK) return; //In-arena Tap foreach ($this->pg->arenas as $a) { if ($t = $a->inArena($ev->getPlayer()->getName())) { if ($t == 2) $ev->setCancelled(); if ($a->GAME_STATE == 0) $ev->setCancelled(); return; } } //Join sign Tap check $key = $ev->getBlock()->x . ':' . $ev->getBlock()->y . ':' . $ev->getBlock()->z . ':' . $ev->getBlock()->getLevel()->getName(); if (array_key_exists($key, $this->pg->signs)) $this->pg->arenas[$this->pg->signs[$key]]->join($ev->getPlayer()); unset($key); } PHP: $key = $ev->getBlock()->x . ':' . $ev->getBlock()->y . ':' . $ev->getBlock()->z . ':' . $ev->getBlock()->getLevel()->getName();