menu
#7862988 Call to a member function getCause() on null

Submitted by PocketMine-MP 4.10.1

General information

Version: 4.10.1
Git commit: a39938e6
Plugin involvement: Direct
Report date: 2022-11-24 15:56:04 +0000 UTC
Server uptime: 0 days 0 hours 21 minutes 44 seconds

System Information

PHP version: 8.0.24
JIT status: Disabled
Operating system: linux
System banner: Linux df4e21f2-ae11-4f27-9c91-319225e02529 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64

Error information

Warning: the TopKill plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getCause() on null
File: plugins/TopKill_dev-24.phar/src/FRashkar/TopKill/Events/PlayerDeath
Line: #32
Error level: Error
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    public function __construct(Main $plugin){

$this->plugin = $plugin;
}

public function PlayerDeath(PlayerDeathEvent $event){

$player = $event->getPlayer();
$name = $player->getName();
$cause = $player->getLastDamageCause()->getCause();

if($cause == EntityDamageEvent::CAUSE_ENTITY_ATTACK){

$damager = $player->getLastDamageCause()->getDamager();
if($damager instanceof Player){
$dname = $damager->getName();
$this->plugin->kill->set($dname, $this->plugin->kill->get($dname)+1);
$this->plugin->death->set($dname, $this->plugin->death->get($dname)+1);
}
}
#0 pmsrc/src/event/RegisteredListener(60): FRashkar\TopKill\Events\PlayerDeath->PlayerDeath(object pocketmine\event\player\PlayerDeathEvent#102231)
#1 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerDeathEvent#102231)
#2 pmsrc/src/player/Player(2240): pocketmine\event\Event->call()
#3 pmsrc/src/entity/Entity(551): pocketmine\player\Player->onDeath()
#4 plugins/CombatLogger_dev-14.phar/src/JackNoordhuis/CombatLogger/EventListener(132): pocketmine\entity\Entity->kill()
#5 pmsrc/src/event/RegisteredListener(60): JackNoordhuis\CombatLogger\EventListener->onQuit(object pocketmine\event\player\PlayerQuitEvent#126225)
#6 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerQuitEvent#126225)
#7 pmsrc/src/player/Player(2127): pocketmine\event\Event->call()
#8 pmsrc/src/network/mcpe/NetworkSession(601): pocketmine\player\Player->onPostDisconnect(string[17] client disconnect, null)
#9 pmsrc/src/network/mcpe/NetworkSession(534): pocketmine\network\mcpe\NetworkSession->pocketmine\network\mcpe\{closure}()
#10 pmsrc/src/network/mcpe/NetworkSession(603): pocketmine\network\mcpe\NetworkSession->tryDisconnect(object Closure#123558, string[17] client disconnect)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(141): pocketmine\network\mcpe\NetworkSession->onClientDisconnect(string[17] client disconnect)
#12 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(75): pocketmine\network\mcpe\raklib\RakLibInterface->onClientDisconnect(int 0, string[17] client disconnect)
#13 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#29532)
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#16 pmsrc/src/Server(1707): pocketmine\snooze\SleeperHandler->sleepUntil(float 1669305364.9358)
#17 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#18 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#19 pmsrc/src/PocketMine(328): pocketmine\server()
#20 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show