menu
#4775739 Call to a member function getNameTag() on null

Submitted by PocketMine-MP 3.17.5

General information

Version: 3.17.5
Git commit: 3a0c8dd5
Plugin involvement: Direct
Report date: 2021-02-23 13:01:53 +0000 UTC
Server uptime: 0 days 0 hours 38 minutes 46 seconds

System Information

PHP version: 7.4.15
Operating system: linux
System banner: Linux IlmiDz 5.4.0-1039-azure #41~18.04.1-Ubuntu SMP Mon Jan 18 14:00:01 UTC 2021 x86_64

Error information

Warning: the SkyWars plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getNameTag() on null
File: plugins/SkyWars_v1.phar/src/SkyWars/Main
Line: #495
Error level: Error
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
        $arena = $this->getPlayerArena($player);
$status = "[" . ($arena->getSlot(true) - 1) . "/" . $arena->getSlot() . "]";

$last_cause_ev = $player->getLastDamageCause();
switch ($last_cause_ev->getCause()) {
case EntityDamageEvent::CAUSE_ENTITY_ATTACK:
$damager = $last_cause_ev->getDamager();
$message = strtr($this->lang["death.player"], [
'{COUNT}' => $status,
'{KILLER}' => $damager instanceof Player ? $damager->getDisplayName() : ($damager instanceof Living ? $damager->getName() : $damager->getNameTag()),
'{PLAYER}' => $player->getDisplayName()
]);
break;
case EntityDamageEvent::CAUSE_PROJECTILE:
$damager = $last_cause_ev->getDamager();
$message = strtr($this->lang["death.arrow"], [
'{COUNT}' => $status,
'{KILLER}' => $damager instanceof Player ? $damager->getDisplayName() : ($damager instanceof Living ? $damager->getName() : $damager->getNameTag()),
'{PLAYER}' => $player->getDisplayName()
]);
#0 plugins/SkyWars_v1.phar/src/SkyWars/EventListener(281): SkyWars\Main->sendDeathMessage(object pocketmine\Player)
#1 pmsrc/src/pocketmine/plugin/MethodEventExecutor(42): SkyWars\EventListener->onDamage(object pocketmine\event\entity\EntityDamageEvent)
#2 pmsrc/src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object SkyWars\EventListener, object pocketmine\event\entity\EntityDamageEvent)
#3 pmsrc/src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageEvent)
#4 pmsrc/src/pocketmine/entity/Entity(932): pocketmine\event\Event->call()
#5 pmsrc/src/pocketmine/entity/Living(552): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageEvent)
#6 pmsrc/src/pocketmine/Player(3915): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageEvent)
#7 plugins/SkyWars_v1.phar/src/SkyWars/EventListener(208): pocketmine\Player->attack(object pocketmine\event\entity\EntityDamageEvent)
#8 pmsrc/src/pocketmine/plugin/MethodEventExecutor(42): SkyWars\EventListener->onMove(object pocketmine\event\player\PlayerMoveEvent)
#9 pmsrc/src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object SkyWars\EventListener, object pocketmine\event\player\PlayerMoveEvent)
#10 pmsrc/src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerMoveEvent)
#11 pmsrc/src/pocketmine/Player(1665): pocketmine\event\Event->call()
#12 pmsrc/src/pocketmine/Player(1779): pocketmine\Player->processMostRecentMovements()
#13 pmsrc/src/pocketmine/level/Level(854): pocketmine\Player->onUpdate(integer 46508)
#14 pmsrc/src/pocketmine/level/Level(787): pocketmine\level\Level->actuallyDoTick(integer 46508)
#15 pmsrc/src/pocketmine/Server(2266): pocketmine\level\Level->doTick(integer 46508)
#16 pmsrc/src/pocketmine/Server(2397): pocketmine\Server->checkTickUpdates(integer 46508, double 1614085313.1143)
#17 pmsrc/src/pocketmine/Server(2153): pocketmine\Server->tick()
#18 pmsrc/src/pocketmine/Server(1993): pocketmine\Server->tickProcessor()
#19 pmsrc/src/pocketmine/Server(1587): pocketmine\Server->start()
#20 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[11] /root/nani/, string[19] /root/nani/plugins/)
#21 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
#22 pmsrc(11): require(string[66] phar:///root/nani/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show