How do u make pots disappear like after you use em for an example would I use the PlayerInteractEvent
PHP: public function onInteract(PlayerInteractEvent $event){ $player = $event->getPlayer(); $item = $event->getItem(); if($item->getId == 373){ $effect = new EffectInstance(Effect::getEffect(1), 20, 1); //add speed for 1 second you know $effect->setVisible(false); $player->addEffect($effect); $player->getInventory()->removeItem($player->getInventory()->getItemInHand()); }} list of id items: https://gamepedia.cursecdn.com/mine....png?version=b4c261e3c01eca5dedcce349917039d7
(click on the image to play the video) So you want to drink the potion normally, but instead of an empty bottle remaining nothing should remain? By PlayerInteractEvent, do you mean that you want a potion to be instantly consumed when clicking it on the floor? Don't. Hardcode. IDs. Ever.
PlayerInteractEvent is not the way to go here as this fires right when you click something, not after drinking the potion (which is what the author wants). And, please use the constants from src/pocketmine/item/ItemIds.php instead of hardcoding the ID. Try using the PlayerItemConsumeEvent instead.