Hello. Everyone I want to create Remove Arrow Plugin. If arrow hit the block Remove it. PHP: <?phpnamespace RA;use pocketmine\Player;use pocketmine\entity\Entity;use pocketmine\entity\Arrow;use pocketmine\event\entity\ProjectileHitBlockEvent;use pocketmine\plugin\PluginBase;use pocketmine\Server;class RemoveArrow extends PluginBase {public function hitblock(ProjectileHitBlockEvent $ev){ if($ev->getEntity() instanceof Arrow){ $ev->getEntity()->close(); } }} It isn't work
Have you registered the listener? PHP: class RemoveArrow extends PluginBase implements \pocketmine\event\Listener { And PHP: public function onEnable() { $this->getServer()->getPluginManager()->registerListeners($this, $this);}