Spawning Splash Potion

Discussion in 'Spigot Plugin Development' started by Stevie212, Mar 14, 2018.

  1. So i tried spawning a splash potion with this piece of code and nothing happened

    ThrownPotion thrownPotion = (ThrownPotion)p.getWorld().spawnEntity(p.getEyeLocation(), EntityType.SPLASH_POTION);

    Can i get some help from anyone?
  2. Can we see more of your code?
  3. thrownPotion.getEffects().addAll(Potion.fromItemStack(pot).getEffects());
  4. Anyone willing to help me? I really need this
  5. I'm a bit confused are you trying to give the player a splash potion or imitate a potion being thrown?
  6. Throw a splash potion.. but it doesn’t seem to work.
  7. Why don't you simply just make the particles then?
  8. or if your using it to make an effect happen then just give everything in x radius that affect?
  9. If thrownpotions behanve the same way as potions do (wich is a big if) then the issue would be you should be doing thrownPotion.apply(pot)
    #9 Drakonn, Apr 4, 2018
    Last edited: Apr 4, 2018
  10. I tried that, it didn't work.

    Okay ill have to try that

Share This Page