类的使用
org.bukkit.potion.PotionEffect
程序包
说明
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.用于操作可以存储在
物品堆
的额外数据的接口.Isolated components which may form part of item meta.
代表每种
药水
属性和操作的类的集合.-
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()
返回应用于此药水瓶的药水效果.MushroomCow.getEffectsForNextStew()
Gets an immutable list containing all custom potion effects applied to the next suspicious stew received from milking thisMushroomCow
.修饰符和类型方法说明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
MushroomCow.addEffectToNextStew
(@NotNull PotionEffect effect, boolean overwrite) Adds a custom potion effect to be applied to the next suspicious stew received from milking thisMushroomCow
.boolean
LivingEntity.addPotionEffect
(@NotNull PotionEffect effect) 向生物实体添加指定的PotionEffect
(药水效果).boolean
LivingEntity.addPotionEffect
(@NotNull PotionEffect effect, boolean force) 已过时。由于现已支持多个同种类型的药水效果, 没必要强制添加.void
Player.sendPotionEffectChange
(@NotNull LivingEntity entity, @NotNull PotionEffect effect) Change a potion effect for the target entity.修饰符和类型方法说明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.inventory.meta.components中PotionEffect的使用
修饰符和类型方法说明FoodComponent.addEffect
(@NotNull PotionEffect effect, float probability) Adds an effect which may be applied by this item when eaten.void
FoodComponent.FoodEffect.setEffect
(@NotNull PotionEffect effect) Sets the effect which may be applied. -
org.bukkit.potion中PotionEffect的使用
修饰符和类型方法说明PotionBrewer.createEffect
(@NotNull PotionEffectType potion, int duration, int amplifier) 创建指定类型的药水效果
, 应用指定的时长.abstract @NotNull PotionEffect
PotionEffectType.createEffect
(int duration, int amplifier) 以本效果类型创建一个药水效果, 并应用持续时间与倍率.修饰符和类型方法说明PotionBrewer.getEffects
(@NotNull PotionType type, boolean upgraded, boolean extended) 已过时。时长延长/升阶的药水已经有其专属的PotionType
.PotionBrewer.getEffectsFromDamage
(int damage) 已过时。无任何作用PotionType.getPotionEffects()
PotionType.InternalPotionData.getPotionEffects()
已过时。修饰符和类型方法说明boolean
PotionEffect.isShorterThan
(@NotNull PotionEffect other) Returns whether or not this potion effect has a shorter duration than the provided potion effect.