menu
#2907328 Call to undefined method pocketmine\entity\projectile\Arrow::getInventory()

Submitted by PocketMine-MP 3.9.0

General information

Version: 3.9.0
Git commit: bd69c66d
Plugin involvement: Direct
Report date: 2019-10-09 22:30:03 +0000 UTC

System Information

PHP version: 7.2.11
Operating system: linux
System banner: Linux ns521168.ip-192-99-8.net 2.6.32-openvz-042stab136.1-amd64 #1 SMP Wed Feb 27 09:05:16 MSK 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\Arrow::getInventory()
File: plugins/AdminTroll-a-plugin-PocketMine-MP- (1).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(99): 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(3722): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#6 src/pocketmine/entity/projectile/Projectile(318): pocketmine\Player->attack(object pocketmine\event\entity\EntityDamageByEntityEvent)
#7 src/pocketmine/entity/projectile/Arrow(150): pocketmine\entity\projectile\Projectile->onHitEntity(object pocketmine\Player, object pocketmine\math\RayTraceResult)
#8 src/pocketmine/entity/projectile/Projectile(252): pocketmine\entity\projectile\Arrow->onHitEntity(object pocketmine\Player, object pocketmine\math\RayTraceResult)
#9 src/pocketmine/entity/Entity(1472): pocketmine\entity\projectile\Projectile->move(double -0.5315229791394, double -0.49413588778495, double -0.40507783437935)
#10 src/pocketmine/level/Level(848): pocketmine\entity\Entity->onUpdate(integer 1405342)
#11 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 1405342)
#12 src/pocketmine/Server(2445): pocketmine\level\Level->doTick(integer 1405342)
#13 src/pocketmine/Server(2576): pocketmine\Server->checkTickUpdates(integer 1405342, double 1570660203.9786)
#14 src/pocketmine/Server(2345): pocketmine\Server->tick()
#15 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#16 src/pocketmine/Server(1784): pocketmine\Server->start()
#17 src/pocketmine/PocketMine(274): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[26] /home/minecraft-pe/server/, string[34] /home/minecraft-pe/server/plugins/)
#18 (1): require(string[81] phar:///home/minecraft-pe/server/PocketMine-MP.phar/src/pocketmine/PocketMine.ph)

Loaded Plugins

  • Show

Server Settings

  • Show