menu
#7556607 PrimeGames\area\Region::isCommandBanned(): Argument #1 ($command) must be of type pocketmine\command\Command, null given, called in phar:///home/container/plugins/Primer.phar/src/PrimeGames/area/RegionManager.php on line 164

Submitted by PocketMine-MP 4.9.0

General information

Version: 4.9.0
Git commit: 785dc712
Plugin involvement: Direct
Report date: 2022-09-22 21:00:11 +0000 UTC
Server uptime: 0 days 4 hours 51 minutes 6 seconds

System Information

PHP version: 8.0.16
JIT status: Disabled
Operating system: linux
System banner: Linux 475dbf80-4dd4-4eea-a800-2d500db8bcac 5.4.0-124-generic #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64

Error information

Warning: the Primer plugin was directly involved in this crash. Please contact the plugin author.
Message: PrimeGames\area\Region::isCommandBanned(): Argument #1 ($command) must be of type pocketmine\command\Command, null given, called in phar:///home/container/plugins/Primer.phar/src/PrimeGames/area/RegionManager.php on line 164
File: plugins/Primer.phar/src/PrimeGames/area/Region
Line: #167
Error level: TypeError
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
    public function banCommands(string ...$commands): void {
foreach($commands as $command) {
if(Server::getInstance()->getCommandMap()->getCommand($command) === null){
throw new \InvalidArgumentException("Command $command does not exist");
}
$this->bannedCommands[$command] = $command;
}
}

public function isCommandBanned(Command $command): bool {
$strings = array_merge($command->getAliases(), [$command->getName()]);
foreach($strings as $string) {
if(isset($this->bannedCommands[$string])) {
return true;
}
}
return false;
}

}
#0 plugins/Primer.phar/src/PrimeGames/area/RegionManager(164): PrimeGames\area\Region->isCommandBanned(null)
#1 pmsrc/src/event/RegisteredListener(60): PrimeGames\area\RegionManager->onCommand(object pocketmine\event\server\CommandEvent#399168)
#2 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\CommandEvent#399168)
#3 pmsrc/src/Server(1440): pocketmine\event\Event->call()
#4 pmsrc/src/player/Player(1410): pocketmine\Server->dispatchCommand(object PrimeGames\Prison\PrisonPlayer#387097, string[1] s)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(754): pocketmine\player\Player->chat(string[2] /s)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#382061)
#7 pmsrc/src/network/mcpe/NetworkSession(409): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#379412)
#8 pmsrc/src/network/mcpe/NetworkSession(372): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#382061, string[23] M./s..KD3..&0.5ZV......)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[26] ..e./f...b..][email protected]*.c..=...)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[35] .U..8.......s.....0........'.<....$)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#71856)
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#14 pmsrc/src/Server(1707): pocketmine\snooze\SleeperHandler->sleepUntil(float 1663880411.8027)
#15 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#16 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[16] /home/container/, string[24] /home/container/plugins/)
#17 pmsrc/src/PocketMine(328): pocketmine\server()
#18 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show