类的使用
org.bukkit.potion.PotionEffect
程序包
说明
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.用于操作可以存储在
物品堆
的额外数据的接口.代表每种
药水
属性和操作的类的集合.-
org.bukkit.block中PotionEffect的使用
-
org.bukkit.entity中PotionEffect的使用
修饰符和类型方法说明LivingEntity.getActivePotionEffects()
返回当前作用于生物实体的所有PotionEffect
.AreaEffectCloud.getCustomEffects()
获取这片云的全部自定义药水效果.Arrow.getCustomEffects()
Gets an immutable list containing all custom potion effects applied to this arrow.ThrownPotion.getEffects()
返回应用于此药水瓶的药水效果.修饰符和类型方法说明boolean
AreaEffectCloud.addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) 向这片云添加一个自定义药水效果.boolean
Arrow.addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) Adds a custom potion effect to this arrow.boolean
LivingEntity.addPotionEffect
(@NotNull PotionEffect effect) 向生物实体添加指定的PotionEffect
(药水效果).boolean
LivingEntity.addPotionEffect
(@NotNull PotionEffect effect, boolean force) 已过时。由于现已支持多个同种类型的药水效果, 没必要强制添加.修饰符和类型方法说明boolean
LivingEntity.addPotionEffects
(@NotNull Collection<PotionEffect> effects) 尝试向生物实体添加所有指定的PotionEffect
(药水效果). -
org.bukkit.event.entity中PotionEffect的使用
修饰符和类型方法说明EntityPotionEffectEvent.getNewEffect()
获取将被应用的新药水效果.EntityPotionEffectEvent.getOldEffect()
获取将被移除的旧药水效果.限定符构造器说明EntityPotionEffectEvent
(@NotNull LivingEntity livingEntity, @Nullable PotionEffect oldEffect, @Nullable PotionEffect newEffect, @NotNull EntityPotionEffectEvent.Cause cause, @NotNull EntityPotionEffectEvent.Action action, boolean override) -
org.bukkit.inventory.meta中PotionEffect的使用
修饰符和类型方法说明PotionMeta.getCustomEffects()
获取这个药水的全部自定义效果.SuspiciousStewMeta.getCustomEffects()
获取这个迷之炖菜的全部自定义效果.修饰符和类型方法说明boolean
PotionMeta.addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) 向此药水添加一个自定义药水效果.boolean
SuspiciousStewMeta.addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) 添加一个自定义药水效果到这个迷之炖菜上. -
org.bukkit.potion中PotionEffect的使用
修饰符和类型方法说明PotionBrewer.createEffect
(@NotNull PotionEffectType potion, int duration, int amplifier) 创建指定类型的药水效果
, 应用指定的时长.PotionEffectType.createEffect
(int duration, int amplifier) 以本效果类型创建一个药水效果, 并应用持续时间与倍率.修饰符和类型方法说明Potion.getEffects()
已过时。返回此药水应用于实体后的效果的列表.PotionBrewer.getEffects
(@NotNull PotionType type, boolean upgraded, boolean extended) 返回从指定药水种类中可应用的效果的列表.PotionBrewer.getEffectsFromDamage
(int damage) 已过时。无任何作用修饰符和类型方法说明boolean
PotionEffect.isShorterThan
(@NotNull PotionEffect other) Returns whether or not this potion effect has a shorter duration than the provided potion effect.