How to give splash potion in 1.9?

Discussion in 'Spigot Plugin Development' started by Simo389, Mar 4, 2016.

  1. So in 1.8 I've been using this to give players splash potions:
    Code (Text):
    Potion dpotion = new Potion(PotionType.INSTANT_DAMAGE);
    ItemStack dpotionstack = dpotion.toItemStack(1);
    player.getInventory().setItem(1, dpotionstack);
    But in 1.9 this now does this:

    What's the correct way to do this in 1.9? I'd assume there's a new approach that works with lingering potions too.
  2. As of now, there is no way but to do it manually. The Potion class from Bukkit is broken.
    • Useful Useful x 1
    • Winner Winner x 1