menu
#3551219 Call to undefined method pocketmine\entity\object\PrimedTNT::getInventory()

Submitted by PocketMine-MP 3.11.3

General information

Version: 3.11.3
Git commit: 0d5704b1
Plugin involvement: Direct
Report date: 2020-01-14 09:09:39 +0000 UTC

System Information

PHP version: 7.3.7
Operating system: android
System banner: Linux localhost 4.9.112-perf-gf7ec296 #1 SMP PREEMPT Fri Nov 22 12:32:37 CST 2019 aarch64

Error information

Warning: the AdminTroll plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\entity\object\PrimedTNT::getInventory()
File: plugins/AdminTroll-a-plugin-PocketMine-MP-.phar/src/Swourire/AdminTroll/Events/Events
Line: #26
Error level: Error
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    public function __construct(Main $plugin){
$this->plugin = $plugin;
}

public function onPlayerHit(EntityDamageByEntityEvent $event){
$damager = $event->getDamager();

$player = $event->getEntity();

$item = $damager->getInventory()->getItemInHand();
if($item->getId() === 369 && $item->getCustomName() === '§l§1> §r§bReal Smiter'){
$this->plugin->functions->sendLightning($player);
}
if($item->getId() === 280 && $item->getCustomName() === '§l§1> §r§bFalse Smiter'){
$this->plugin->functions->sendLightning($player);
$event->setCancelled();
}
if($item->getId() === 20 && $item->getCustomName() === '§l§1> §r§bTrapper'){
$this->plugin->functions->trapPlayer($player);
$event->setCancelled();
#0 src/pocketmine/plugin/MethodEventExecutor(38): Swourire\AdminTroll\Events\Events->onPlayerHit(object pocketmine\event\entity\EntityDamageByEntityEvent)
#1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object Swourire\AdminTroll\Events\Events, object pocketmine\event\entity\EntityDamageByEntityEvent)
#2 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageByEntityEvent)
#3 src/pocketmine/entity/Entity(992): pocketmine\event\Event->call()
#4 src/pocketmine/entity/Living(574): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#5 src/pocketmine/Player(3759): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#6 src/pocketmine/level/Explosion(206): pocketmine\Player->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#7 src/pocketmine/entity/object/PrimedTNT(113): pocketmine\level\Explosion->explodeB()
#8 src/pocketmine/entity/object/PrimedTNT(98): pocketmine\entity\object\PrimedTNT->explode()
#9 src/pocketmine/entity/Entity(1481): pocketmine\entity\object\PrimedTNT->entityBaseTick(integer 1)
#10 src/pocketmine/level/Level(853): pocketmine\entity\Entity->onUpdate(integer 29873)
#11 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 29873)
#12 src/pocketmine/Server(2446): pocketmine\level\Level->doTick(integer 29873)
#13 src/pocketmine/Server(2577): pocketmine\Server->checkTickUpdates(integer 29873, double 1578992978.8919)
#14 src/pocketmine/Server(2346): pocketmine\Server->tick()
#15 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#16 src/pocketmine/Server(1785): pocketmine\Server->start()
#17 src/pocketmine/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[34] /storage/emulated/0/PocketMine-MP/, string[42] /storage/emulated/0/PocketMine-MP/plugins/)
#18 src/pocketmine/PocketMine(291): pocketmine\server()
#19 (1): require(string[89] phar:///storage/emulated/0/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Pocke)

Loaded Plugins

  • Show

Server Settings

  • Show