Open ghost opened 4 years ago
i have set 3 arenas in the same world, sometimes when all 3 arenas are in-game and a player joins the queue the server crashes.
Error: Return value of robske_110\TTT\Game\Game::getArena() must be an instance of robske_110\TTT\Game\Arena, null returned
File: plugins/TicTacToe-dev/src/robske_110/TTT/Game/Game Line: 201 Type: TypeError THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: TicTacToe v1.0.0-InDev-alpha1-pre Code: [192] var_dump($this->arena); [193] throw new \Exception("getOpponent: failed");*/ [194] return null; [195] } [196] [197] /** [198] * @return Arena [199] */ [200] public function getArena(): Arena{ [201] return $this->arena; [202] } [203] [204] /** [205] * @param Player $player [206] */ [207] public function addPlayer(Player $player){ [208] $this->players[$player->getId()] = [$player, false]; [209] } [210] [211] /** Backtrace: #0 plugins/TicTacToe-dev/src/robske_110/TTT/Game/GameManager(67): robske_110\TTT\Game\Game->getArena() #1 plugins/TicTacToe-dev/src/robske_110/TTT/PlayerManager(95): robske_110\TTT\Game\GameManager->startGame(object robske_110\TTT\Game\Game) #2 plugins/TicTacToe-dev/src/robske_110/TTT/PlayerManager(67): robske_110\TTT\PlayerManager->startGame(integer 511) #3 plugins/TicTacToe-dev/src/robske_110/TTT/TicTacToe(199): robske_110\TTT\PlayerManager->addPlayer(integer 511) #4 src/pocketmine/command/PluginCommand(54): robske_110\TTT\TicTacToe->onCommand(object pocketmine\Player, object pocketmine\command\PluginCommand, string[7] tttjoin, array[0]) #5 src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\PluginCommand->execute(object pocketmine\Player, string[7] tttjoin, array[0]) #6 src/pocketmine/Server(1807): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\Player, string[7] tttjoin) #7 plugins/Festival-stable/src/genboy/Festival/Festival(3009): pocketmine\Server->dispatchCommand(object pocketmine\Player, string[7] tttjoin) #8 plugins/Festival-stable/src/genboy/Festival/Festival(2910): genboy\Festival\Festival->runAreaEvent(object genboy\Festival\Area, object pocketmine\event\player\PlayerMoveEvent, string[5] enter) #9 plugins/Festival-stable/src/genboy/Festival/Festival(1394): genboy\Festival\Festival->enterArea(object genboy\Festival\Area, object pocketmine\event\player\PlayerMoveEvent) #10 src/pocketmine/plugin/MethodEventExecutor(42): genboy\Festival\Festival->onMove(object pocketmine\event\player\PlayerMoveEvent) #11 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object genboy\Festival\Festival, object pocketmine\event\player\PlayerMoveEvent) #12 src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerMoveEvent) #13 src/pocketmine/Player(1594): pocketmine\event\Event->call() #14 src/pocketmine/Player(1702): pocketmine\Player->processMovement(integer 1) #15 src/pocketmine/level/Level(844): pocketmine\Player->onUpdate(integer 23774) #16 src/pocketmine/level/Level(777): pocketmine\level\Level->actuallyDoTick(integer 23774) #17 src/pocketmine/Server(2256): pocketmine\level\Level->doTick(integer 23774) #18 src/pocketmine/Server(2387): pocketmine\Server->checkTickUpdates(integer 23774, double 1587513141.7964) #19 src/pocketmine/Server(2143): pocketmine\Server->tick() #20 src/pocketmine/Server(1990): pocketmine\Server->tickProcessor() #21 src/pocketmine/Server(1584): pocketmine\Server->start() #22 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[47] /home/minecraft/multicraft/servers/server22957/, string[55] /home/minecraft/multicraft/servers/server22957/plugins/) #23 src/pocketmine/PocketMine(296): pocketmine\server() #24 (11): require(string[113] phar:///home/minecraft/multicraft/jar/versions/PocketMine/PocketMine-MP-3.12.0.p) PocketMine-MP version: 3.12.0 [Protocol 390]```
i have set 3 arenas in the same world, sometimes when all 3 arenas are in-game and a player joins the queue the server crashes.