接口 ThrownPotion

所有超级接口:
CommandSender, Entity, Metadatable, Nameable, Permissible, Projectile, ServerOperator
所有已知子接口:
LingeringPotion, SplashPotion

public interface ThrownPotion extends Projectile
Represents a thrown potion bottle
  • 方法详细资料

    • getEffects

      Collection<PotionEffect> getEffects()
      Returns the effects that are applied by this potion.
      返回:
      The potion effects
    • getItem

      ItemStack 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.

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

      void setItem(ItemStack item)
      Set the ItemStack for this thrown potion.

      The ItemStack must be a potion, otherwise an exception is thrown.

      参数:
      item - New ItemStack