程序包 org.bukkit.entity

# 接口 AreaEffectCloud

所有超级接口:
  `CommandSender`, `Entity`, `Metadatable`, `Nameable`, `Permissible`, `PersistentDataHolder`, `ServerOperator`

public interface AreaEffectCloud extends Entity
代表一片即将对处于其中的生物施加药水效果的区域效果云 (即喷溅药水使用后形成的雾).

参考： 区块格式#AreaEffectCloud 滞留药水

- ## 嵌套类概要

  ## 从接口继承的嵌套类/接口 org.bukkit.entity.Entity

  `Entity.Spigot`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `boolean`
  `addCustomEffect(@NotNull PotionEffect effect, boolean overwrite)`
  向这片云添加一个自定义药水效果.
  `void`
  `clearCustomEffects()`
  从这片云移除所有自定义药水效果.
  `@Nullable PotionData`
  `getBasePotionData()`
  已过时。
  Upgraded / extended potions are now their own `PotionType` use `getBasePotionType()` instead.
  `@Nullable PotionType`
  `getBasePotionType()`
  返回基本药水的药水类型.
  `@NotNull Color`
  `getColor()`
  获取这片云的颜色, 即粒子的颜色.
  `@NotNull List<PotionEffect>`
  `getCustomEffects()`
  获取这片云的全部自定义药水效果.
  `int`
  `getDuration()`
  获取这片云存在的时间 (单位为tick).
  `int`
  `getDurationOnUse()`
  获取这片云对一个实体产生效果后持续时间应减少多少.
  `@NotNull Particle`
  `getParticle()`
  获取组成这片云的粒子.
  `float`
  `getRadius()`
  获取这片云的初始半径.
  `float`
  `getRadiusOnUse()`
  获取这片云对一个实体产生效果后半径应该减少多少.
  `float`
  `getRadiusPerTick()`
  获取每tick这片云的半径应缩小多少.
  `int`
  `getReapplicationDelay()`
  获取实体受到效果后的免疫时间.
  `@Nullable ProjectileSource`
  `getSource()`
  检索这片云的初始来源.
  `int`
  `getWaitTime()`
  获取实体受到效果前的延迟的时间.
  `boolean`
  `hasCustomEffect(@Nullable PotionEffectType type)`
  检查这片云中是否存在一种特定的自定义药水效果类型.
  `boolean`
  `hasCustomEffects()`
  检查自定义药水效果是否有效.
  `boolean`
  `removeCustomEffect(@NotNull PotionEffectType type)`
  从这片云移除一个自定义药水效果.
  `void`
  `setBasePotionData(@Nullable PotionData data)`
  已过时。
  Upgraded / extended potions are now their own `PotionType` use `setBasePotionType(org.bukkit.potion.PotionType)` instead.
  `void`
  `setBasePotionType(@Nullable PotionType type)`
  设置基本药水类型.
  `void`
  `setColor(@NotNull Color color)`
  设置这片云的颜色, 即粒子的颜色.
  `void`
  `setDuration(int duration)`
  设置这片云存在的时间 (单位为tick).
  `void`
  `setDurationOnUse(int duration)`
  设置这片云对一个实体产生效果后持续时间应减少多少.
  `void`
  `setParticle(@NotNull Particle particle)`
  设置组成这片云的粒子.
  `<T> void`
  `setParticle(@NotNull Particle particle, T data)`
  设置组成这片云的粒子.
  `void`
  `setRadius(float radius)`
  设置这片云的初始半径.
  `void`
  `setRadiusOnUse(float radius)`
  设置这片云对一个实体产生效果后半径应该减少多少.
  `void`
  `setRadiusPerTick(float radius)`
  设置每一tick这片云的半径应缩小多少.
  `void`
  `setReapplicationDelay(int delay)`
  设置实体受到效果后的免疫时间.
  `void`
  `setSource(@Nullable ProjectileSource source)`
  设置这片云的初始来源.
  `void`
  `setWaitTime(int waitTime)`
  设置实体受到效果前的延迟时间.

  ### 从接口继承的方法 org.bukkit.command.CommandSender

  `getName, sendMessage, sendMessage, sendMessage, sendMessage`

  ### 从接口继承的方法 org.bukkit.entity.Entity

  `addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport`

  ### 从接口继承的方法 org.bukkit.metadata.Metadatable

  `getMetadata, hasMetadata, removeMetadata, setMetadata`

  ### 从接口继承的方法 org.bukkit.Nameable

  `getCustomName, setCustomName`

  ### 从接口继承的方法 org.bukkit.permissions.Permissible

  `addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment`

  ### 从接口继承的方法 org.bukkit.persistence.PersistentDataHolder

  `getPersistentDataContainer`

  ### 从接口继承的方法 org.bukkit.permissions.ServerOperator

  `isOp, setOp`

- ## 方法详细资料

  - ### getDuration

    int getDuration()
    获取这片云存在的时间 (单位为tick).

    原文: Gets the duration which this cloud will exist for (in ticks).

    返回:
      持续时间

  - ### setDuration

    void setDuration(int duration)
    设置这片云存在的时间 (单位为tick).

    原文: Sets the duration which this cloud will exist for (in ticks).

    参数:
      `duration` - 持续时间

  - ### getWaitTime

    int getWaitTime()
    获取实体受到效果前的延迟的时间.

    原文: Gets the time which an entity has to be exposed to the cloud before the effect is applied.

    返回:
      延迟时间

  - ### setWaitTime

    void setWaitTime(int waitTime)
    设置实体受到效果前的延迟时间.

    原文: Sets the time which an entity has to be exposed to the cloud before the effect is applied.

    参数:
      `waitTime` - 延迟时间

  - ### getReapplicationDelay

    int getReapplicationDelay()
    获取实体受到效果后的免疫时间.

    原文: Gets the time that an entity will be immune from subsequent exposure.

    返回:
      免疫时间

  - ### setReapplicationDelay

    void setReapplicationDelay(int delay)
    设置实体受到效果后的免疫时间.

    原文: Sets the time that an entity will be immune from subsequent exposure.

    参数:
      `delay` - 免疫时间

  - ### getDurationOnUse

    int getDurationOnUse()
    获取这片云对一个实体产生效果后持续时间应减少多少.

    原文: Gets the amount that the duration of this cloud will decrease by when it applies an effect to an entity.

    返回:
      持续时间的变化量

  - ### setDurationOnUse

    void setDurationOnUse(int duration)
    设置这片云对一个实体产生效果后持续时间应减少多少.

    原文: Sets the amount that the duration of this cloud will decrease by when it applies an effect to an entity.

    参数:
      `duration` - 持续时间的变化量

  - ### getRadius

    float getRadius()
    获取这片云的初始半径.

    原文: Gets the initial radius of the cloud.

    返回:
      半径

  - ### setRadius

    void setRadius(float radius)
    设置这片云的初始半径.

    原文: Sets the initial radius of the cloud.

    参数:
      `radius` - 半径

  - ### getRadiusOnUse

    float getRadiusOnUse()
    获取这片云对一个实体产生效果后半径应该减少多少.

    原文: Gets the amount that the radius of this cloud will decrease by when it applies an effect to an entity.

    返回:
      半径的变化量

  - ### setRadiusOnUse

    void setRadiusOnUse(float radius)
    设置这片云对一个实体产生效果后半径应该减少多少.

    原文: Sets the amount that the radius of this cloud will decrease by when it applies an effect to an entity.

    参数:
      `radius` - 半径的变化量

  - ### getRadiusPerTick

    float getRadiusPerTick()
    获取每tick这片云的半径应缩小多少.

    原文: Gets the amount that the radius of this cloud will decrease by each tick.

    返回:
      每 tick 这片云的半径减少量

  - ### setRadiusPerTick

    void setRadiusPerTick(float radius)
    设置每一tick这片云的半径应缩小多少.

    原文(疑似有误, get应为set): Gets the amount that the radius of this cloud will decrease by each tick.

    参数:
      `radius` - 每 tick 这片云的半径减少量

  - ### getParticle

    @NotNull @NotNull Particle getParticle()
    获取组成这片云的粒子.

    原文: Gets the particle which this cloud will be composed of

    返回:
      粒子类型

  - ### setParticle

    void setParticle(@NotNull @NotNull Particle particle)
    设置组成这片云的粒子.

    原文: Sets the particle which this cloud will be composed of

    参数:
      `particle` - 新的粒子类型

  - ### setParticle

    <T> void setParticle(@NotNull @NotNull Particle particle, @Nullable T data)
    设置组成这片云的粒子.

    原文: Sets the particle which this cloud will be composed of

    类型参数:
      `T` - 粒子效果数据的类型 (参阅 `Particle.getDataType()`
    参数:
      `particle` - 新的粒子类型
      `data` - 为此粒子效果使用的数据, 可为null, 数据类型取决于 `Particle.getDataType()`

  - ### setBasePotionData

    @Deprecated void setBasePotionData(@Nullable @Nullable PotionData data)
    已过时。
    Upgraded / extended potions are now their own `PotionType` use `setBasePotionType(org.bukkit.potion.PotionType)` instead.
    Sets the underlying potion data
    参数:
      `data` - PotionData to set the base potion state to

  - ### getBasePotionData

    @Nullable @Deprecated @Nullable PotionData getBasePotionData()
    已过时。
    Upgraded / extended potions are now their own `PotionType` use `getBasePotionType()` instead.
    Returns the potion data about the base potion
    返回:
      a PotionData object

  - ### setBasePotionType

    void setBasePotionType(@Nullable @Nullable PotionType type)
    设置基本药水类型.

    原文: Sets the underlying potion type

    参数:
      `type` - 用于设置基本药水状态的 `PotionType`

  - ### getBasePotionType

    @Nullable @Nullable PotionType getBasePotionType()
    返回基本药水的药水类型.

    原文: Returns the potion type about the base potion

    返回:
      一个 PotionType 对象.

  - ### hasCustomEffects

    boolean hasCustomEffects()
    检查自定义药水效果是否有效.

    原文: Checks for the presence of custom potion effects.

    返回:
      如果自定义药水效果有效则返回true

  - ### getCustomEffects

    @NotNull @NotNull List<PotionEffect> getCustomEffects()
    获取这片云的全部自定义药水效果. 插件应该在调用这个方法之前检查 hasCustomEffects() 是否返回 true.

    原文: Gets an immutable list containing all custom potion effects applied to this cloud. Plugins should check that hasCustomEffects() returns true before calling this method.

    返回:
      自定义药水效果的不可变集合

  - ### addCustomEffect

    boolean addCustomEffect(@NotNull @NotNull PotionEffect effect, boolean overwrite)
    向这片云添加一个自定义药水效果.

    原文: Adds a custom potion effect to this cloud.

    参数:
      `effect` - 添加的药水效果
      `overwrite` - 是否覆盖当前存在的相同类型效果
    返回:
      如果这次调用成功添加效果则返回true

  - ### removeCustomEffect

    boolean removeCustomEffect(@NotNull @NotNull PotionEffectType type)
    从这片云移除一个自定义药水效果.

    原文: Removes a custom potion effect from this cloud.

    参数:
      `type` - 移除的药水效果类型
    返回:
      如果这次调用成功移除效果则返回true

  - ### hasCustomEffect

    boolean hasCustomEffect(@Nullable @Nullable PotionEffectType type)
    检查这片云中是否存在一种特定的自定义药水效果类型.

    原文: Checks for a specific custom potion effect type on this cloud.

    参数:
      `type` - 检查的药水效果类型
    返回:
      存在这种效果则返回true

  - ### clearCustomEffects

    void clearCustomEffects()
    从这片云移除所有自定义药水效果.

    原文: Removes all custom potion effects from this cloud.

  - ### getColor

    @NotNull @NotNull Color getColor()
    获取这片云的颜色, 即粒子的颜色.

    原文: Gets the color of this cloud. Will be applied as a tint to its particles.

    返回:
      云的颜色

  - ### setColor

    void setColor(@NotNull @NotNull Color color)
    设置这片云的颜色, 即粒子的颜色.

    原文: Sets the color of this cloud. Will be applied as a tint to its particles.

    参数:
      `color` - 云的颜色

  - ### getSource

    @Nullable @Nullable ProjectileSource getSource()
    检索这片云的初始来源.

    原文: Retrieve the original source of this cloud.

    返回:
      投掷药水的 `ProjectileSource`

  - ### setSource

    void setSource(@Nullable @Nullable ProjectileSource source)
    设置这片云的初始来源.

    原文: Set the original source of this cloud.

    参数:
      `source` - 投掷药水的`ProjectileSource`