Package org.bukkit.entity
Interface Arrow
- All Superinterfaces:
AbstractArrow
,Audience
,CommandSender
,Entity
,HoverEventSource<HoverEvent.ShowEntity>
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,PersistentDataViewHolder
,Pointered
,Projectile
,ServerOperator
,Sound.Emitter
- All Known Subinterfaces:
TippedArrow
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.AbstractArrow
AbstractArrow.PickupRule, AbstractArrow.PickupStatus
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 arrow.void
Removes all custom potion effects from this arrow.Deprecated.Returns the potion type about the base potiongetColor()
Gets the color of this arrow.Gets an immutable list containing all custom potion effects applied to this arrow.boolean
Checks for a specific custom potion effect type on this arrow.boolean
Checks for the presence of custom potion effects.boolean
Removes a custom potion effect from this arrow.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 arrow.Methods inherited from interface org.bukkit.entity.AbstractArrow
getAttachedBlock, getDamage, getHitSound, getItem, getItemStack, getKnockbackStrength, getLifetimeTicks, getPickupRule, getPickupStatus, getPierceLevel, getWeapon, isCritical, isInBlock, isShotFromCrossbow, setCritical, setDamage, setHitSound, setItem, setItemStack, setKnockbackStrength, setLifetimeTicks, setPickupRule, setPickupStatus, setPierceLevel, setShooter, setShotFromCrossbow, setWeapon
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.entity.Projectile
canHitEntity, doesBounce, getOwnerUniqueId, getShooter, hasBeenShot, hasLeftShooter, hitEntity, hitEntity, setBounce, setHasBeenShot, setHasLeftShooter, setShooter
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
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
-
getColor
Gets the color of this arrow.- Returns:
- arrow
Color
or null if not color is set
-
setColor
Sets the color of this arrow. Will be applied as a tint to its particles.- Parameters:
color
- arrow color, null to clear the color
-
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 arrow.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 arrow.- 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 arrow.- Parameters:
type
- the potion effect type to remove- Returns:
- true if the effect was removed as a result of this call
- Throws:
IllegalArgumentException
- if this operation would leave the Arrow in a state with no Custom Effects and PotionType.UNCRAFTABLE
-
hasCustomEffect
Checks for a specific custom potion effect type on this arrow.- 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 arrow.- Throws:
IllegalArgumentException
- if this operation would leave the Arrow in a state with no Custom Effects and PotionType.UNCRAFTABLE
-
PotionType
usegetBasePotionType()
instead.