menu
#7304908 Call to a member function getItemInHand() on null

Submitted by PocketMine-MP 4.6.2+dev

General information

Version: 4.6.2+dev
Git commit: a76c095c
Plugin involvement: Indirect
Report date: 2022-08-06 02:01:31 +0000 UTC
Server uptime: 0 days 6 hours 30 minutes 56 seconds

System Information

PHP version: 8.0.19
Operating system: linux
System banner: Linux localhost 5.4.0-1086-azure #91~18.04.1-Ubuntu SMP Thu Jun 23 20:33:05 UTC 2022 x86_64

Error information

Warning: the Slapper plugin was indirectly involved in this crash. This may be a false positive. Please contact the plugin author before opening a bug ticket.
Message: Call to a member function getItemInHand() on null
File: pmsrc/src/entity/Human
Line: #481
Error level: Error
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
			$this->getUniqueId(),
$this->getName(),
$this->getId(),
"",
$this->location->asVector3(),
$this->getMotion(),
$this->location->pitch,
$this->location->yaw,
$this->location->yaw, //TODO: head yaw
ItemStackWrapper::legacy(TypeConverter::getInstance()->coreItemStackToNet($player->getNetworkSession()->getProtocolId(), $this->getInventory()->getItemInHand())),
GameMode::SURVIVAL,
$this->getAllNetworkData(),
UpdateAbilitiesPacket::create(0, 0, $this->getId() /* TODO: this should be unique ID */, []),
[], //TODO: entity links
"", //device ID (we intentionally don't send this - secvuln)
DeviceOS::UNKNOWN //we intentionally don't send this (secvuln)
));

//TODO: Hack for MCPE 1.2.13: DATA_NAMETAG is useless in AddPlayerPacket, so it has to be sent separately
$this->sendData([$player], [EntityMetadataProperties::NAMETAG => new StringMetadataProperty($this->getNameTag())]);
#0 plugins/Slapper_v2.0.9.phar/src/slapper/entities/SlapperHuman(85): pocketmine\entity\Human->sendSpawnPacket(object pocketmine\player\Player#772881)
#1 pmsrc/src/entity/Entity(1491): slapper\entities\SlapperHuman->sendSpawnPacket(object pocketmine\player\Player#772881)
#2 pmsrc/src/entity/Human(462): pocketmine\entity\Entity->spawnTo(object pocketmine\player\Player#772881)
#3 plugins/TopLevel_v0.0.1.phar/src/maxelore/toplevel/TopLevel(232): pocketmine\entity\Human->spawnTo(object pocketmine\player\Player#772881)
#4 pmsrc/src/event/RegisteredListener(60): maxelore\toplevel\TopLevel->onJoin(object pocketmine\event\player\PlayerJoinEvent#757000)
#5 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerJoinEvent#757000)
#6 pmsrc/src/player/Player(839): pocketmine\event\Event->call()
#7 pmsrc/src/network/mcpe/NetworkSession(762): pocketmine\player\Player->doFirstSpawn()
#8 pmsrc/src/network/mcpe/NetworkSession(755): pocketmine\network\mcpe\NetworkSession->onClientSpawnResponse()
#9 pmsrc/src/network/mcpe/handler/SpawnResponsePacketHandler(38): pocketmine\network\mcpe\NetworkSession->pocketmine\network\mcpe\{closure}()
#10 pmsrc/vendor/nethergamesmc/bedrock-protocol/src/SetLocalPlayerAsInitializedPacket(42): pocketmine\network\mcpe\handler\SpawnResponsePacketHandler->handleSetLocalPlayerAsInitialized(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket#757056)
#11 pmsrc/src/network/mcpe/NetworkSession(441): pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket->handle(object pocketmine\network\mcpe\handler\SpawnResponsePacketHandler#720926)
#12 pmsrc/src/network/mcpe/NetworkSession(401): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket#757056, int 534, string[3] q.H)
#13 pmsrc/src/network/mcpe/raklib/RakLibInterface(192): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[53] c...a6.....DO8...v.9..yV.6g..L.............`/.&^[9.6.)
#14 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[62] ..Z4.b.....Q~..A........&..%.2d..J..."m..`.. ......s...k.tj...)
#15 pmsrc/src/network/mcpe/raklib/RakLibInterface(122): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#31834)
#16 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#17 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#18 pmsrc/src/Server(1709): pocketmine\snooze\SleeperHandler->sleepUntil(float 1659751291.3631)
#19 pmsrc/src/Server(1068): pocketmine\Server->tickProcessor()
#20 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[24] /home/maxelore/Survival/, string[32] /home/maxelore/Survival/plugins/)
#21 pmsrc/src/PocketMine(327): pocketmine\server()
#22 pmsrc(11): require(string[68] phar:///home/maxelore/Survival/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show