Spoiler: console log 15:08:48 [CRITICAL] Could not execute task Annihilation\Arena\ArenaSchedule: Only variables should be passed by reference 15:08:48 [NOTICE] RuntimeException: "Only variables should be passed by reference" (E_STRICT) in "/plugins/Annihilation/src/Annihilation/Arena/Arena" at line 475 my code: PHP: public function selectMap(){ $stats = $this->votingManager->currentTable['stats']; $map = $this->votingManager->currentTable[array_pop(sort($stats))]; //bad line $this->map = $map; $this->data = $this->plugin->maps[$map]; foreach($this->arenateams->getAllPlayers() as $p){ $p->sendTip(TextFormat::BOLD.TextFormat::YELLOW.$map.TextFormat::GOLD." was chosen"); } $this->worldManager->addWorld($map); } can you help me? i have never seen this error.
The "sort" function doesn't make any type of return, it directly modify the array variable, so your code may look like: PHP: public function selectMap(){ $stats = $this->votingManager->currentTable['stats']; sort($stats) // New fixing line $map = $this->votingManager->currentTable[array_pop($stats)]; //Modified bad line $this->map = $map; $this->data = $this->plugin->maps[$map]; foreach($this->arenateams->getAllPlayers() as $p){ $p->sendTip(TextFormat::BOLD.TextFormat::YELLOW.$map.TextFormat::GOLD." was chosen"); } $this->worldManager->addWorld($map); }