接口 AreaEffectCloud
- 所有超级接口:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,ServerOperator
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot
-
方法概要
修饰符和类型方法说明boolean
addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) 向这片云添加一个自定义药水效果.void
从这片云移除所有自定义药水效果.已过时。返回基本药水的药水类型.getColor()
获取这片云的颜色, 即粒子的颜色.获取这片云的全部自定义药水效果.int
获取这片云存在的时间 (单位为tick).int
获取这片云对一个实体产生效果后持续时间应减少多少.获取组成这片云的粒子.float
获取这片云的初始半径.float
获取这片云对一个实体产生效果后半径应该减少多少.float
获取每tick这片云的半径应缩小多少.int
获取实体受到效果后的免疫时间.检索这片云的初始来源.int
获取实体受到效果前的延迟的时间.boolean
检查这片云中是否存在一种特定的自定义药水效果类型.boolean
检查自定义药水效果是否有效.boolean
从这片云移除一个自定义药水效果.void
已过时。Upgraded / extended potions are now their ownPotionType
usesetBasePotionType(org.bukkit.potion.PotionType)
instead.void
设置基本药水类型.void
设置这片云的颜色, 即粒子的颜色.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
获取组成这片云的粒子.原文: Gets the particle which this cloud will be composed of
- 返回:
- 粒子类型
-
setParticle
设置组成这片云的粒子.原文: Sets the particle which this cloud will be composed of
- 参数:
particle
- 新的粒子类型
-
setParticle
设置组成这片云的粒子.原文: Sets the particle which this cloud will be composed of
- 类型参数:
T
- 粒子效果数据的类型 (参阅Particle.getDataType()
- 参数:
particle
- 新的粒子类型data
- 为此粒子效果使用的数据, 可为null, 数据类型取决于Particle.getDataType()
-
setBasePotionData
已过时。Upgraded / extended potions are now their ownPotionType
usesetBasePotionType(org.bukkit.potion.PotionType)
instead.Sets the underlying potion data- 参数:
data
- PotionData to set the base potion state to
-
getBasePotionData
已过时。Upgraded / extended potions are now their ownPotionType
usegetBasePotionType()
instead.Returns the potion data about the base potion- 返回:
- a PotionData object
-
setBasePotionType
设置基本药水类型.原文: Sets the underlying potion type
- 参数:
type
- 用于设置基本药水状态的PotionType
-
getBasePotionType
返回基本药水的药水类型.原文: Returns the potion type about the base potion
- 返回:
- 一个 PotionType 对象.
-
hasCustomEffects
boolean hasCustomEffects()检查自定义药水效果是否有效.原文: Checks for the presence of custom potion effects.
- 返回:
- 如果自定义药水效果有效则返回true
-
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
向这片云添加一个自定义药水效果.原文: Adds a custom potion effect to this cloud.
- 参数:
effect
- 添加的药水效果overwrite
- 是否覆盖当前存在的相同类型效果- 返回:
- 如果这次调用成功添加效果则返回true
-
removeCustomEffect
从这片云移除一个自定义药水效果.原文: Removes a custom potion effect from this cloud.
- 参数:
type
- 移除的药水效果类型- 返回:
- 如果这次调用成功移除效果则返回true
-
hasCustomEffect
检查这片云中是否存在一种特定的自定义药水效果类型.原文: 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
获取这片云的颜色, 即粒子的颜色.原文: Gets the color of this cloud. Will be applied as a tint to its particles.
- 返回:
- 云的颜色
-
setColor
设置这片云的颜色, 即粒子的颜色.原文: Sets the color of this cloud. Will be applied as a tint to its particles.
- 参数:
color
- 云的颜色
-
getSource
检索这片云的初始来源.原文: Retrieve the original source of this cloud.
- 返回:
- 投掷药水的
ProjectileSource
-
setSource
设置这片云的初始来源.原文: Set the original source of this cloud.
- 参数:
source
- 投掷药水的ProjectileSource
-
PotionType
usegetBasePotionType()
instead.