public interface AbstractArrow extends Projectile
| Modifier and Type | Interface and Description | 
|---|---|
static class  | 
AbstractArrow.PickupRule
Deprecated.  
 | 
static class  | 
AbstractArrow.PickupStatus
Represents the pickup status of this arrow. 
 | 
Entity.Spigot| Modifier and Type | Method and Description | 
|---|---|
@Nullable Block | 
getAttachedBlock()
Gets the block to which this arrow is attached. 
 | 
double | 
getDamage()
Gets the base amount of damage this arrow will do. 
 | 
ItemStack | 
getItemStack()
Gets the ItemStack for this arrow. 
 | 
int | 
getKnockbackStrength()
Gets the knockback strength for an arrow, which is the
  
KnockBack level
 of the bow that shot it. | 
default AbstractArrow.PickupRule | 
getPickupRule()
Deprecated. 
 
Use  
getPickupStatus() as an upstream compatible replacement for this function | 
@NotNull AbstractArrow.PickupStatus | 
getPickupStatus()
Gets the current pickup status of this arrow. 
 | 
int | 
getPierceLevel()
Gets the number of times this arrow can pierce through an entity. 
 | 
boolean | 
isCritical()
Gets whether this arrow is critical. 
 | 
boolean | 
isInBlock()
Gets whether this arrow is in a block or not. 
 | 
boolean | 
isShotFromCrossbow()
Gets if this arrow was shot from a crossbow. 
 | 
void | 
setCritical(boolean critical)
Sets whether or not this arrow should be critical. 
 | 
void | 
setDamage(double damage)
Sets the base amount of damage this arrow will do. 
 | 
void | 
setKnockbackStrength(int knockbackStrength)
Sets the knockback strength for an arrow. 
 | 
default void | 
setPickupRule(AbstractArrow.PickupRule rule)
Deprecated. 
 
Use  
setPickupStatus(PickupStatus) with AbstractArrow.PickupStatus as an upstream compatible replacement for this function | 
void | 
setPickupStatus(@NotNull AbstractArrow.PickupStatus status)
Sets the current pickup status of this arrow. 
 | 
void | 
setPierceLevel(int pierceLevel)
Sets the number of times this arrow can pierce through an entity. 
 | 
void | 
setShotFromCrossbow(boolean shotFromCrossbow)
Sets if this arrow was shot from a crossbow. 
 | 
doesBounce, getShooter, setBounce, setShooteraddPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsyncgetMetadata, hasMetadata, removeMetadata, setMetadatagetName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageaudience, audience, clearTitle, empty, hideBossBar, openBook, openBook, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSound, toAudienceaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentisOp, setOpcustomName, customName, getCustomName, setCustomNamegetPersistentDataContainerint getKnockbackStrength()
KnockBack level
 of the bow that shot it.void setKnockbackStrength(int knockbackStrength)
knockbackStrength - the knockback strength valuedouble getDamage()
0.5 * (1 + power level) added for arrows fired from
 enchanted bows.void setDamage(double damage)
damage - new damage amountint getPierceLevel()
void setPierceLevel(int pierceLevel)
pierceLevel - new pierce levelboolean isCritical()
Critical arrows have increased damage and cause particle effects.
Critical arrows generally occur when a player fully draws a bow before firing.
void setCritical(boolean critical)
critical - whether or not it should be criticalboolean isInBlock()
Arrows in a block are motionless and may be picked up by players.
@Nullable @Nullable Block getAttachedBlock()
@NotNull @NotNull AbstractArrow.PickupStatus getPickupStatus()
void setPickupStatus(@NotNull @NotNull AbstractArrow.PickupStatus status)
status - new pickup status of this arrow.boolean isShotFromCrossbow()
void setShotFromCrossbow(boolean shotFromCrossbow)
shotFromCrossbow - if shot from a crossbow@NotNull ItemStack getItemStack()
@Deprecated default AbstractArrow.PickupRule getPickupRule()
getPickupStatus() as an upstream compatible replacement for this functionAbstractArrow.PickupRule for this arrow.
 This is generally AbstractArrow.PickupRule.ALLOWED only if the arrow was
 not fired from a bow with the infinity enchantment.
@Deprecated default void setPickupRule(AbstractArrow.PickupRule rule)
setPickupStatus(PickupStatus) with AbstractArrow.PickupStatus as an upstream compatible replacement for this functionrule - The pickup ruleCopyright © 2022. All rights reserved.