menu
#7304446 Call to undefined method pocketmine\event\server\CommandEvent::getPlayer()

Submitted by PocketMine-MP 4.6.0

General information

Version: 4.6.0
Git commit: 3ccd288a
Plugin involvement: Direct
Report date: 2022-08-05 23:57:45 +0000 UTC
Server uptime: 0 days 0 hours 7 minutes 44 seconds

System Information

PHP version: 8.0.13
Operating system: linux
System banner: Linux ns528620 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64

Error information

Warning: the Vasar plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\event\server\CommandEvent::getPlayer()
File: plugins/VasarPM.phar/src/Warro/listeners/PlayerListener
Line: #183
Error level: Error
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
		if (is_null($session)) {
return;
}

$session->onQuit($event);
}

public function onCommand(CommandEvent $event): void
{
$player = $event->getPlayer();
if (!$player instanceof User) {
return;
}

$session = Base::getInstance()->sessionManager->getSession($player);
if (is_string($session->banned)) {
$event->cancel();
return;
}

#0 pmsrc/src/event/RegisteredListener(60): Warro\listeners\PlayerListener->onCommand(object pocketmine\event\server\CommandEvent#134287)
#1 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\CommandEvent#134287)
#2 pmsrc/src/Server(1438): pocketmine\event\Event->call()
#3 pmsrc/src/player/Player(1410): pocketmine\Server->dispatchCommand(object Warro\User#31383, string[23] rank puls add moderator)
#4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(737): pocketmine\player\Player->chat(string[24] /rank puls add moderator)
#5 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#127353)
#6 pmsrc/src/network/mcpe/NetworkSession(392): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#103412)
#7 pmsrc/src/network/mcpe/NetworkSession(355): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#127353, string[45] M./rank puls add moderator.7N.?.O...J..#.....)
#8 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[48] ..../J..V((.)VHLIQ..OI-J,./b0..d......^;........)
#9 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[57] .w....=..+...jn.;.5.h....6%.C..q0Q~....~%.....^r.w.`V....)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#29825)
#11 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#13 pmsrc/src/Server(1703): pocketmine\snooze\SleeperHandler->sleepUntil(float 1659743865.3664)
#14 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#15 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[18] /root/VasarTestPM/, string[26] /root/VasarTestPM/plugins/)
#16 pmsrc/src/PocketMine(327): pocketmine\server()
#17 pmsrc(11): require(string[62] phar:///root/VasarTestPM/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show