Hello I’m doing a duels plugin I have seen other servers like Versai in which you tap a splash potion of healing (mobile) and the potion drops (no holding for the potion to throw). So I wanted to try doing the same thing but I don’t seem to know how? Here is what I have so far. PHP: public function handleInteract(PlayerInteractEvent $event){ $item = $event->getPlayer()->getInventory()->getItemInHand(); $player = $event->getPlayer(); if($item->getId() == 373 && $item->getDamage() == 16421){ ///from here I’m stuck }} anyone have any idea to make this work?
I believe you are trying to do something called TapToPot. Check out this source code TapToPot: https://github.com/PocketMineItalia...r/src/PocketMineItalianDevs/TapToPot/Main.php
https://github.com/jkorn2324/Practice/blob/master/old/src/practice/PracticeUtil.php Line 551 https://github.com/jkorn2324/Practice/blob/master/old/src/practice/PracticeListener.php Line 727