1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

OnInteract with Splash Potions

Discussion in 'Plugin Help' started by WEATHERCRAFTYT1, May 18, 2021.

  1. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    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?
     
  2. Axon

    Axon Zombie

    Messages:
    276
    Agent likes this.
  3. Pqoster

    Pqoster Spider Jockey

    Messages:
    25
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.