How can i spawn the entity when i Right click a block then spawn entity on top of it? i know how to spawn entity but i just want to spawn it using an item then when player top a block it'll spawn on top of it like i said. Thanks in advance UwU
PHP: public function onInteract(PlayerInteractEvent $event) { $item = $event->getItem();} https://github.com/pmmp/PocketMine-...mine/event/player/PlayerInteractEvent.php#L74
That code, but: PHP: public function onInteract(PlayerInteractEvent $event) { $item = $event->getItem();$id = $item->getId();$neededitemid=280; #Search in internet Minecraft ID'sif ($id===$neededitemid){#yc goes here}}