error:::[Server thread/CRITICAL]: pocketmine\plugin\PluginException: "pocketmine\event\entity\EntityDamageByEntityEvent does not have a handler list" (EXCEPTION) in "/src/pocketmine/plugin/PluginManager" at line 790 my code::: PHP: public function pvpNintendoElDevPro(EntityDamageByEntityEvent $event){ $killer = $event->getDamager(); $world = $killer->getLevel()->getName(); $mundos = $this->getConfig()->get("mundos"); if(in_array($world, $mundos)) { if ($killer instanceof Player) { if($killer->getItemInHand()->getId() === 276){ $event->setCancelled(false); }else{ $event->setCancelled(true); } } } }
I believe you need to use EntityDamageEvent, then check if it is an instanceof EntityDamageByEntityEvent.