menu
#4583733 Call to a member function addItem() on null

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-10-18 07:00:06 +0000 UTC

System Information

PHP version: 7.3.22
Operating system: linux
System banner: Linux 72d7abc1-2985-45e8-9cda-3faa40cf3877 4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020 x86_64

Error information

Warning: the BuildFFA plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function addItem() on null
File: plugins/BuildFFA_v1.0.0.phar/src/BUILD/Blocks/GiveBlock
Line: #27
Error level: Error
18
19
20
21
22
23
24
25
26
27
28
29
    public $player;

public function __construct(BUILD $plugin, Player $player){
$this->plugin = $plugin;
$this->player = $player;
}

public function onRun(int $currentTick){
$item = ItemFactory::get(179, 0 ,1);
$this->player->getInventory()->addItem($item);
}
}
#0 src/pocketmine/scheduler/TaskHandler(137): BUILD\Blocks\GiveBlock->onRun(integer 72997)
#1 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 72997)
#2 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 72997)
#3 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 72997)
#4 src/pocketmine/Server(2154): pocketmine\Server->tick()
#5 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#6 src/pocketmine/Server(1588): pocketmine\Server->start()
#7 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#8 src/pocketmine/PocketMine(304): pocketmine\server()
#9 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies