接口 ThrownPotion

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

public interface ThrownPotion extends ThrowableProjectile
代表一个被抛出的药水瓶.
  • 方法详细资料

    • getEffects

      返回应用于此药水瓶的药水效果.

      原文: Returns the effects that are applied by this potion.

      返回:
      药水效果
    • getItem

      返回此药水瓶物品的副本.

      修改此物品副本并不会直接修改这个被抛出的药水瓶本身. 如果你希望修改此药水瓶, 你必须使用setItemStack方法.

      原文: 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.

      指定者:
      getItem 在接口中 ThrowableProjectile
      返回:
      此药水瓶的副本
    • setItem

      void setItem(@NotNull @NotNull ItemStack item)
      设置此药水瓶物品.

      设置的物品必须为药水, 否则此方法会抛出异常.

      原文: Set the ItemStack for this thrown potion.

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

      指定者:
      setItem 在接口中 ThrowableProjectile
      参数:
      item - 要设置的药水物品.