Package org.bukkit.entity
Interface Arrow
- All Superinterfaces:
- AbstractArrow,- Audience,- CommandSender,- Entity,- HoverEventSource<HoverEvent.ShowEntity>,- Metadatable,- Nameable,- Permissible,- PersistentDataHolder,- Pointered,- Projectile,- ServerOperator,- Sound.Emitter
- All Known Subinterfaces:
- TippedArrow
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.bukkit.entity.AbstractArrowAbstractArrow.PickupRule, AbstractArrow.PickupStatusNested classes/interfaces inherited from interface org.bukkit.entity.EntityEntity.Spigot
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddCustomEffect(@NotNull PotionEffect effect, boolean overwrite) Adds a custom potion effect to this arrow.voidRemoves all custom potion effects from this arrow.Returns the potion data about the base potiongetColor()Gets the color of this arrow.Gets an immutable list containing all custom potion effects applied to this arrow.booleanChecks for a specific custom potion effect type on this arrow.booleanChecks for the presence of custom potion effects.booleanRemoves a custom potion effect from this arrow.voidSets the underlying potion datavoidSets the color of this arrow.Methods inherited from interface org.bukkit.entity.AbstractArrowgetAttachedBlock, getDamage, getHitSound, getItemStack, getKnockbackStrength, getLifetimeTicks, getPickupRule, getPickupStatus, getPierceLevel, hasNoPhysics, isCritical, isInBlock, isShotFromCrossbow, setCritical, setDamage, setHitSound, setKnockbackStrength, setLifetimeTicks, setNoPhysics, setPickupRule, setPickupStatus, setPierceLevel, setShotFromCrossbowMethods inherited from interface net.kyori.adventure.audience.AudienceclearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSendergetName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.EntityaddPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, 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, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface net.kyori.adventure.text.event.HoverEventSourceasHoverEventMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.NameablecustomName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.PermissibleaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointeredget, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.entity.ProjectilecanHitEntity, doesBounce, getOwnerUniqueId, getShooter, hasBeenShot, hasLeftShooter, hitEntity, hitEntity, setBounce, setHasBeenShot, setHasLeftShooter, setShooterMethods inherited from interface org.bukkit.permissions.ServerOperatorisOp, setOp
- 
Method Details- 
setBasePotionDataSets the underlying potion data- Parameters:
- data- PotionData to set the base potion state to
 
- 
getBasePotionDataReturns the potion data about the base potion- Returns:
- a PotionData object
 
- 
getColorGets the color of this arrow.- Returns:
- arrow Coloror null if not color is set
 
- 
setColorSets the color of this arrow. Will be applied as a tint to its particles.- Parameters:
- color- arrow color, null to clear the color
 
- 
hasCustomEffectsboolean hasCustomEffects()Checks for the presence of custom potion effects.- Returns:
- true if custom potion effects are applied
 
- 
getCustomEffectsGets 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
 
- 
addCustomEffectAdds a custom potion effect to this arrow.- Parameters:
- effect- the potion effect to add
- overwrite- 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
 
- 
removeCustomEffectRemoves 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
 
- 
hasCustomEffectChecks 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
 
- 
clearCustomEffectsvoid 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
 
 
-