Package org.bukkit.entity
Interface AreaEffectCloud
- All Superinterfaces:
Audience
,CommandSender
,Entity
,HoverEventSource<HoverEvent.ShowEntity>
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,PersistentDataViewHolder
,Pointered
,ServerOperator
,Sound.Emitter
Represents an area effect cloud which will imbue a potion effect onto
entities which enter it.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) Adds a custom potion effect to this cloud.void
Removes all custom potion effects from this cloud.Deprecated.Returns the potion type about the base potiongetColor()
Gets the color of this cloud.Gets an immutable list containing all custom potion effects applied to this cloud.int
Gets the duration which this cloud will exist for (in ticks).int
Gets the amount that the duration of this cloud will decrease by when it applies an effect to an entity.Get the entity UUID for the owner of this area effect cloud.Gets the particle which this cloud will be composed offloat
Gets the initial radius of the cloud.float
Gets the amount that the radius of this cloud will decrease by when it applies an effect to an entity.float
Gets the amount that the radius of this cloud will decrease by each tick.int
Gets the time that an entity will be immune from subsequent exposure.Retrieve the original source of this cloud.int
Gets the time which an entity has to be exposed to the cloud before the effect is applied.boolean
Checks for a specific custom potion effect type on this cloud.boolean
Checks for the presence of custom potion effects.boolean
Removes a custom potion effect from this cloud.void
Deprecated.Upgraded / extended potions are now their ownPotionType
usesetBasePotionType(org.bukkit.potion.PotionType)
instead.void
Sets the underlying potion typevoid
Sets the color of this cloud.void
setDuration
(int duration) Sets the duration which this cloud will exist for (in ticks).void
setDurationOnUse
(int duration) Sets the amount that the duration of this cloud will decrease by when it applies an effect to an entity.void
setOwnerUniqueId
(UUID ownerUuid) Sets the entity UUID for the owner of this area effect cloud.void
setParticle
(@NotNull Particle particle) Sets the particle which this cloud will be composed of<T> void
setParticle
(@NotNull Particle particle, T data) Sets the particle which this cloud will be composed ofvoid
setRadius
(float radius) Sets the initial radius of the cloud.void
setRadiusOnUse
(float radius) Sets the amount that the radius of this cloud will decrease by when it applies an effect to an entity.void
setRadiusPerTick
(float radius) Gets the amount that the radius of this cloud will decrease by each tick.void
setReapplicationDelay
(int delay) Sets the time that an entity will be immune from subsequent exposure.void
setSource
(@Nullable ProjectileSource source) Set the original source of this cloud.void
setWaitTime
(int waitTime) Sets the time which an entity has to be exposed to the cloud before the effect is applied.Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessage
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, broadcastHurtAnimation, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getAsString, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvisible, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
getDuration
int getDuration()Gets the duration which this cloud will exist for (in ticks).- Returns:
- cloud duration
-
setDuration
void setDuration(int duration) Sets the duration which this cloud will exist for (in ticks).- Parameters:
duration
- cloud duration
-
getWaitTime
int getWaitTime()Gets the time which an entity has to be exposed to the cloud before the effect is applied.- Returns:
- wait time
-
setWaitTime
void setWaitTime(int waitTime) Sets the time which an entity has to be exposed to the cloud before the effect is applied.- Parameters:
waitTime
- wait time
-
getReapplicationDelay
int getReapplicationDelay()Gets the time that an entity will be immune from subsequent exposure.- Returns:
- reapplication delay
-
setReapplicationDelay
void setReapplicationDelay(int delay) Sets the time that an entity will be immune from subsequent exposure.- Parameters:
delay
- reapplication delay
-
getDurationOnUse
int getDurationOnUse()Gets the amount that the duration of this cloud will decrease by when it applies an effect to an entity.- Returns:
- duration on use delta
-
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.- Parameters:
duration
- duration on use delta
-
getRadius
float getRadius()Gets the initial radius of the cloud.- Returns:
- radius
-
setRadius
void setRadius(float radius) Sets the initial radius of the cloud.- Parameters:
radius
- radius
-
getRadiusOnUse
float getRadiusOnUse()Gets the amount that the radius of this cloud will decrease by when it applies an effect to an entity.- Returns:
- radius on use delta
-
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.- Parameters:
radius
- radius on use delta
-
getRadiusPerTick
float getRadiusPerTick()Gets the amount that the radius of this cloud will decrease by each tick.- Returns:
- radius per tick delta
-
setRadiusPerTick
void setRadiusPerTick(float radius) Gets the amount that the radius of this cloud will decrease by each tick.- Parameters:
radius
- per tick delta
-
getParticle
Gets the particle which this cloud will be composed of- Returns:
- particle the set particle type
-
setParticle
Sets the particle which this cloud will be composed of- Parameters:
particle
- the new particle type
-
setParticle
Sets the particle which this cloud will be composed of- Type Parameters:
T
- type of particle data (seeParticle.getDataType()
- Parameters:
particle
- the new particle typedata
- the data to use for the particle or null, the type of this depends onParticle.getDataType()
-
setBasePotionData
Deprecated.Upgraded / extended potions are now their ownPotionType
usesetBasePotionType(org.bukkit.potion.PotionType)
instead.Sets the underlying potion data- Parameters:
data
- PotionData to set the base potion state to
-
getBasePotionData
Deprecated.Upgraded / extended potions are now their ownPotionType
usegetBasePotionType()
instead.Returns the potion data about the base potion- Returns:
- a PotionData object
-
setBasePotionType
Sets the underlying potion type- Parameters:
type
- PotionType to set the base potion state to
-
getBasePotionType
Returns the potion type about the base potion- Returns:
- a PotionType object
-
hasCustomEffects
boolean hasCustomEffects()Checks for the presence of custom potion effects.- Returns:
- true if custom potion effects are applied
-
getCustomEffects
Gets an immutable list containing all custom potion effects applied to this cloud.Plugins should check that hasCustomEffects() returns true before calling this method.
- Returns:
- the immutable list of custom potion effects
-
addCustomEffect
Adds a custom potion effect to this cloud.- Parameters:
effect
- the potion effect to addoverwrite
- true if any existing effect of the same type should be overwritten- Returns:
- true if the effect was added as a result of this call
-
removeCustomEffect
Removes a custom potion effect from this cloud.- Parameters:
type
- the potion effect type to remove- Returns:
- true if the an effect was removed as a result of this call
-
hasCustomEffect
Checks for a specific custom potion effect type on this cloud.- Parameters:
type
- the potion effect type to check for- Returns:
- true if the potion has this effect
-
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.- Returns:
- cloud color
-
setColor
Sets the color of this cloud. Will be applied as a tint to its particles.- Parameters:
color
- cloud color
-
getSource
Retrieve the original source of this cloud.- Returns:
- the
ProjectileSource
that threw the LingeringPotion
-
setSource
Set the original source of this cloud.- Parameters:
source
- theProjectileSource
that threw the LingeringPotion
-
getOwnerUniqueId
Get the entity UUID for the owner of this area effect cloud.- Returns:
- the entity owner uuid or null
-
setOwnerUniqueId
Sets the entity UUID for the owner of this area effect cloud.- Parameters:
ownerUuid
- the entity owner uuid or null to clear
-
PotionType
usegetBasePotionType()
instead.