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

Submitted by PocketMine-MP 3.11.1

General information

Version: 3.11.1
Git commit: 40a2211a
Plugin involvement: Direct
Report date: 2020-03-24 12:21:43 +0000 UTC

System Information

PHP version: 7.3.7
Operating system: linux
System banner: Linux 031e31660e3a 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64

Error information

Warning: the Weapons plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getItemInHand() on null
File: plugins/Weapons_dev-4.phar/src/xBeastMode/Weapons/FireGunTask
Line: #91
Error level: Error
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
                        }else{
RandomUtils::playSound("random.click", $this->player, 500, 0.5);
$this->player->sendTip("§cOut of ammo.");

$this->cancel();
return;
}
}

if(!$this->player->getInventory()->getItemInHand()->equals($this->gun)){
$this->cancel();
return;
}

$this->core->fire($this->player, $this->gun, $this->ammo);
$gunType = $this->gun->getCustomBlockData()->getString("gunType");;

$this->player->sendTip("§c{$this->amount} rounds left");

RandomUtils::playSound("firework.blast", $this->player, 500, GunData::getShotPitch($gunType));
#0 src/pocketmine/scheduler/TaskHandler(159): xBeastMode\Weapons\FireGunTask->onRun(integer 595525)
#1 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 595525)
#2 src/pocketmine/plugin/PluginManager(682): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 595525)
#3 src/pocketmine/Server(2567): pocketmine\plugin\PluginManager->tickSchedulers(integer 595525)
#4 src/pocketmine/Server(2343): pocketmine\Server->tick()
#5 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#6 src/pocketmine/Server(1785): pocketmine\Server->start()
#7 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[15] /home/gs-41378/, string[23] /home/gs-41378/plugins/)
#8 src/pocketmine/PocketMine(295): pocketmine\server()
#9 (1): require(string[75] phar:///home/gs-41378/PocketMine-MP 1.14.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show