menu
#3552973 Call to undefined method pocketmine\entity\projectile\SplashPotion::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 15:35:13 +0000 UTC

System Information

PHP version: 7.3.7
Operating system: linux
System banner: Linux b8986c4a56f5 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53 UTC 2019 x86_64

Error information

Warning: the AdminTroll plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\entity\projectile\SplashPotion::getInventory()
File: plugins/AdminTroll-a-plugin-PocketMine-MP-.phar/src/Swourire/AdminTroll/Events/Events
Line: #28
Error level: Error
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    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() === ItemIds::BLAZE_ROD && $item->getCustomName() === '§l§1> §r§bReal Smiter'){
$this->plugin->functions->sendLightning($player);
}
if($item->getId() === ItemIds::STICK && $item->getCustomName() === '§l§1> §r§bFalse Smiter'){
$this->plugin->functions->sendLightning($player);
$event->setCancelled();
}
if($item->getId() === ItemIds::GLASS && $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/entity/Effect(304): pocketmine\Player->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#7 src/pocketmine/entity/projectile/SplashPotion(110): pocketmine\entity\Effect->applyEffect(object pocketmine\Player, object pocketmine\entity\EffectInstance, double 0.36271988992151, object pocketmine\entity\projectile\SplashPotion, NULL )
#8 src/pocketmine/entity/projectile/Projectile(249): pocketmine\entity\projectile\SplashPotion->onHit(object pocketmine\event\entity\ProjectileHitBlockEvent)
#9 src/pocketmine/entity/Entity(1472): pocketmine\entity\projectile\Projectile->move(double 0.17373729016822, double -0.50479459858487, double 0.38260254474328)
#10 src/pocketmine/level/Level(853): pocketmine\entity\Entity->onUpdate(integer 76871)
#11 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 76871)
#12 src/pocketmine/Server(2446): pocketmine\level\Level->doTick(integer 76871)
#13 src/pocketmine/Server(2577): pocketmine\Server->checkTickUpdates(integer 76871, double 1579016113.9812)
#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[15] /home/gs-40588/, string[23] /home/gs-40588/plugins/)
#18 src/pocketmine/PocketMine(291): pocketmine\server()
#19 (1): require(string[94] phar:///pro/bin/mcpe/pocketmine-stable-1.14.0/PocketMine-MP.phar/src/pocketmine/)

Loaded Plugins

  • Show

Server Settings

  • Show