类的使用
org.bukkit.potion.PotionEffect
使用PotionEffect的程序包
程序包
说明
用于操作在
世界内的三位像素(方块),包括一些特定的状态.为在
世界内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.用于操作可以存储在
物品堆的额外数据的接口.All classes related to effects from the Consumable Component.
代表每种
药水属性和操作的类的集合.-
org.bukkit.block中PotionEffect的使用
返回PotionEffect的org.bukkit.block中的方法 -
org.bukkit.entity中PotionEffect的使用
返回变量类型为PotionEffect的类型的org.bukkit.entity中的方法修饰符和类型方法说明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.参数类型为PotionEffect的org.bukkit.entity中的方法修饰符和类型方法说明booleanAreaEffectCloud.addCustomEffect(@NotNull PotionEffect effect, boolean overwrite) 向这片云添加一个自定义药水效果.booleanArrow.addCustomEffect(@NotNull PotionEffect effect, boolean overwrite) Adds a custom potion effect to this arrow.booleanMushroomCow.addEffectToNextStew(@NotNull PotionEffect effect, boolean overwrite) Adds a custom potion effect to be applied to the next suspicious stew received from milking thisMushroomCow.booleanLivingEntity.addPotionEffect(@NotNull PotionEffect effect) 向生物实体添加指定的PotionEffect(药水效果).booleanLivingEntity.addPotionEffect(@NotNull PotionEffect effect, boolean force) 已过时。由于现已支持多个同种类型的药水效果, 没必要强制添加.voidPlayer.sendPotionEffectChange(@NotNull LivingEntity entity, @NotNull PotionEffect effect) Change a potion effect for the target entity.类型变量类型为PotionEffect的org.bukkit.entity中的方法参数修饰符和类型方法说明booleanLivingEntity.addPotionEffects(@NotNull Collection<PotionEffect> effects) 尝试向生物实体添加所有指定的PotionEffect(药水效果). -
org.bukkit.event.entity中PotionEffect的使用
修饰符和类型方法说明EntityPotionEffectEvent.getNewEffect()获取将被应用的新药水效果.EntityPotionEffectEvent.getOldEffect()获取将被移除的旧药水效果.参数类型为PotionEffect的org.bukkit.event.entity中的构造器限定符构造器说明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的使用
返回变量类型为PotionEffect的类型的org.bukkit.inventory.meta中的方法修饰符和类型方法说明PotionMeta.getCustomEffects()获取这个药水的全部自定义效果.SuspiciousStewMeta.getCustomEffects()获取这个迷之炖菜的全部自定义效果.参数类型为PotionEffect的org.bukkit.inventory.meta中的方法修饰符和类型方法说明booleanPotionMeta.addCustomEffect(@NotNull PotionEffect effect, boolean overwrite) 向此药水添加一个自定义药水效果.booleanSuspiciousStewMeta.addCustomEffect(@NotNull PotionEffect effect, boolean overwrite) 添加一个自定义药水效果到这个迷之炖菜上. -
org.bukkit.inventory.meta.components.consumable.effects中PotionEffect的使用
修饰符和类型方法说明ConsumableApplyEffects.addEffect(@NotNull PotionEffect effect) Adds an effect which may be applied by this item when consumed.修饰符和类型方法说明ConsumableApplyEffects.getEffects()Gets the effects which may be applied by this item when consumed.修饰符和类型方法说明ConsumableApplyEffects.addEffect(@NotNull PotionEffect effect) Adds an effect which may be applied by this item when consumed.修饰符和类型方法说明voidConsumableApplyEffects.setEffects(@NotNull List<PotionEffect> effects) Sets the effects which may be applied by this item when consumed. -
org.bukkit.potion中PotionEffect的使用
修饰符和类型方法说明PotionBrewer.createEffect(@NotNull PotionEffectType potion, int duration, int amplifier) 创建指定类型的药水效果, 应用指定的时长.abstract @NotNull PotionEffectPotionEffectType.createEffect(int duration, int amplifier) 以本效果类型创建一个药水效果, 并应用持续时间与倍率.返回变量类型为PotionEffect的类型的org.bukkit.potion中的方法修饰符和类型方法说明PotionBrewer.getEffects(@NotNull PotionType type, boolean upgraded, boolean extended) 已过时。时长延长/升阶的药水已经有其专属的PotionType.PotionBrewer.getEffectsFromDamage(int damage) 已过时。无任何作用PotionType.getPotionEffects()PotionType.InternalPotionData.getPotionEffects()已过时。参数类型为PotionEffect的org.bukkit.potion中的方法修饰符和类型方法说明booleanPotionEffect.isShorterThan(@NotNull PotionEffect other) Returns whether or not this potion effect has a shorter duration than the provided potion effect.