menu
#3751649 Call to a member function getHealth() on null

Submitted by PocketMine-MP 3.11.3

General information

Version: 3.11.3
Git commit: 0d5704b1
Plugin involvement: Direct
Report date: 2020-02-12 13:45:21 +0000 UTC

System Information

PHP version: 7.3.13
Operating system: linux
System banner: Linux 2ca121f2-a0dd-4545-8752-e06da30f8795 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3 (2019-09-02) x86_64

Error information

Warning: the OpaBoss_by_Mentgess plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getHealth() on null
File: plugins/OpaBoss_by_Mentagess.phar/src/OpaBoss/Session
Line: #85
Error level: Error
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    public function scoreboardContent(): void{
$player = $this->getPlayer();
$manager = $this->plugin->getBossManager();
if($manager->isOn()){
$this->removeLines();
$this->addDisplay();
$entity = $this->plugin->getBossEntity();

foreach(Settings::getBossScoreboardContent() as $i => $content){
$content = str_replace("{life}", $entity->getHealth() . "/" . $entity->getMaxHealth(), $content);
$content = str_replace("{coords}", "X: " . $entity->getFloorX() . " Y: " . $entity->getFloorY() . " Z: " . $entity->getFloorZ(), $content);
$content = str_replace("{level}", $entity->getLevel()->getName(), $content);
$this->setLine($i, $content, false);
}
$this->sendScoreboard();
}else{
$this->removeDisplay();
}
}

#0 plugins/OpaBoss_by_Mentagess.phar/src/OpaBoss/task/ScoreboardTask(24): OpaBoss\Session->scoreboardContent()
#1 src/pocketmine/scheduler/TaskHandler(159): OpaBoss\task\ScoreboardTask->onRun(integer 6492)
#2 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 6492)
#3 src/pocketmine/plugin/PluginManager(682): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 6492)
#4 src/pocketmine/Server(2570): pocketmine\plugin\PluginManager->tickSchedulers(integer 6492)
#5 src/pocketmine/Server(2346): pocketmine\Server->tick()
#6 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1785): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#9 src/pocketmine/PocketMine(291): pocketmine\server()
#10 (1): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show