Interface ThrownPotion

All Superinterfaces:
Audience, CommandSender, Entity, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, Pointered, Projectile, ServerOperator, Sound.Emitter
All Known Subinterfaces:
LingeringPotion, SplashPotion

public interface ThrownPotion extends Projectile
Represents a thrown potion bottle
  • Method Details

    • getEffects

      Returns the effects that are applied by this potion.
      Returns:
      The potion effects
    • getItem

      Returns a copy of the ItemStack for this thrown potion.

      Altering this copy will not alter the thrown potion directly. If you want to alter the thrown potion, you must use the setItemStack method.

      Returns:
      A copy of the ItemStack for this thrown potion.
    • setItem

      void setItem(@NotNull @NotNull ItemStack item)
      Set the ItemStack for this thrown potion.
      Parameters:
      item - New ItemStack
    • getPotionMeta

      @NotNull PotionMeta getPotionMeta()
      Gets a copy of the PotionMeta for this thrown potion. This includes what effects will be applied by this potion.
      Returns:
      potion meta
    • setPotionMeta

      void setPotionMeta(@NotNull PotionMeta meta)
      Sets the PotionMeta of this thrown potion. This will modify the effects applied by this potion.

      Note that the type of getItem() is irrelevant

      Parameters:
      meta - potion meta