menu
#3968739 Call to a member function getCause() 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-22 21:12:57 +0000 UTC

System Information

PHP version: 7.3.14
Operating system: linux
System banner: Linux f1534f8e51ec 4.4.0-159-generic #187-Ubuntu SMP Thu Aug 1 16:28:06 UTC 2019 x86_64

Error information

Warning: the Bounty plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getCause() on null
File: plugins/Bounty.phar/src/Jack/Bounty/EventListener
Line: #345
Error level: Error
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
            if($msg === "") return;
foreach($this->plugin->getServer()->getOnlinePlayers() as $player){
$player->sendMessage($this->colour($msg));
}
}
}

public function onDeath(PlayerDeathEvent $event){
$cause = $event->getEntity()->getLastDamageCause();
if ($cause->getCause() != 1) return false; //not killed by entity
if (!$cause instanceof EntityDamageByEntityEvent) return false; //double check of above check.
if ($cause->getDamager() instanceof Player) {
$killer = $cause->getDamager();
if(isset($this->plugin->data["bounty"][strtolower($event->getPlayer()->getName())])){

//events:
$ev = new BountyClaimEvent($this->plugin, $killer, $event->getPlayer(), $this->plugin->data["bounty"][strtolower($event->getPlayer()->getName())]);
$this->plugin->getServer()->getPluginManager()->callEvent($ev);
if($ev->isCancelled()){
if($this->plugin->config["bounty_claim_cancelled"] !== "") $killer->sendMessage($this->colour($this->plugin->config["bounty_claim_cancelled"]));
#0 src/pocketmine/plugin/MethodEventExecutor(38): Jack\Bounty\EventListener->onDeath(object pocketmine\event\player\PlayerDeathEvent)
#1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object Jack\Bounty\EventListener, object pocketmine\event\player\PlayerDeathEvent)
#2 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerDeathEvent)
#3 src/pocketmine/Player(3669): pocketmine\event\Event->call()
#4 src/pocketmine/entity/Living(639): pocketmine\Player->onDeath()
#5 src/pocketmine/Player(3658): pocketmine\entity\Living->kill()
#6 src/pocketmine/entity/Entity(1054): pocketmine\Player->kill()
#7 src/pocketmine/entity/Living(143): pocketmine\entity\Entity->setHealth(double 0)
#8 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/world/data/SaveDataManager(21): pocketmine\entity\Living->setHealth(double 0)
#9 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/world/data/SaveDataManager(54): BlockHorizons\PerWorldPlayer\world\data\SaveDataManager::BlockHorizons\PerWorldPlayer\world\data\{closure}(object BlockHorizons\PerWorldPlayer\world\data\PlayerWorldData, object pocketmine\Player)
#10 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/world/data/PlayerWorldData(94): BlockHorizons\PerWorldPlayer\world\data\SaveDataManager::inject(object BlockHorizons\PerWorldPlayer\world\data\PlayerWorldData, object pocketmine\Player)
#11 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/world/WorldInstance(54): BlockHorizons\PerWorldPlayer\world\data\PlayerWorldData->inject(object pocketmine\Player)
#12 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/world/database/LibasynqlWorldDatabase(49): BlockHorizons\PerWorldPlayer\world\WorldInstance->BlockHorizons\PerWorldPlayer\world\{closure}(object BlockHorizons\PerWorldPlayer\world\data\PlayerWorldData)
#13 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/libs/poggit/libasynql/base/DataConnectorImpl(153): BlockHorizons\PerWorldPlayer\world\database\LibasynqlWorldDatabase->BlockHorizons\PerWorldPlayer\world\database\{closure}(array[1], array[10])
#14 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/libs/poggit/libasynql/base/DataConnectorImpl(183): BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\base\DataConnectorImpl->BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\base\{closure}(object BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\result\SqlSelectResult)
#15 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/libs/poggit/libasynql/base/SqlThreadPool(91): BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\base\DataConnectorImpl->BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\base\{closure}(object BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\result\SqlSelectResult)
#16 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/libs/poggit/libasynql/base/DataConnectorImpl(262): BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\base\SqlThreadPool->readResults(array[1])
#17 plugins/PerWorldPlayer.phar/src/BlockHorizons/PerWorldPlayer/libs/poggit/libasynql/CallbackTask(36): BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\base\DataConnectorImpl->checkResults()
#18 src/pocketmine/scheduler/TaskHandler(159): BlockHorizons\PerWorldPlayer\libs\poggit\libasynql\CallbackTask->onRun(integer 7981)
#19 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 7981)
#20 src/pocketmine/plugin/PluginManager(682): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 7981)
#21 src/pocketmine/Server(2567): pocketmine\plugin\PluginManager->tickSchedulers(integer 7981)
#22 src/pocketmine/Server(2343): pocketmine\Server->tick()
#23 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#24 src/pocketmine/Server(1785): pocketmine\Server->start()
#25 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /aternos/server/, string[24] /aternos/server/plugins/)
#26 src/pocketmine/PocketMine(295): pocketmine\server()
#27 (1): require(string[64] phar:///aternos/server/server.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show