public interface Arrow extends Projectile
| Modifier and Type | Interface and Description |
|---|---|
static class |
Arrow.PickupRule
Deprecated.
|
static class |
Arrow.PickupStatus
Represents the pickup status of this arrow.
|
static class |
Arrow.Spigot |
| Modifier and Type | Method and Description |
|---|---|
Block |
getAttachedBlock()
Gets the block to which this arrow is attached.
|
int |
getKnockbackStrength()
Gets the knockback strength for an arrow, which is the
KnockBack level
of the bow that shot it. |
default Arrow.PickupRule |
getPickupRule()
Deprecated.
Use
getPickupStatus() as an upstream compatible replacement for this function |
Arrow.PickupStatus |
getPickupStatus()
Gets the current pickup status of this arrow.
|
boolean |
isCritical()
Gets whether this arrow is critical.
|
boolean |
isInBlock()
Gets whether this arrow is in a block or not.
|
void |
setCritical(boolean critical)
Sets whether or not this arrow should be critical.
|
void |
setKnockbackStrength(int knockbackStrength)
Sets the knockback strength for an arrow.
|
default void |
setPickupRule(Arrow.PickupRule rule)
Deprecated.
Use
setPickupStatus(PickupStatus) with Arrow.PickupStatus as an upstream compatible replacement for this function |
void |
setPickupStatus(Arrow.PickupStatus status)
Sets the current pickup status of this arrow.
|
Arrow.Spigot |
spigot() |
doesBounce, getShooter, setBounce, setShooteraddPassenger, addScoreboardTag, eject, fromMobSpawner, getChunk, getEntityId, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, teleport, teleport, teleport, teleportgetMetadata, hasMetadata, removeMetadata, setMetadatagetName, sendMessage, sendMessage, sendMessage, sendMessageaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentisOp, setOpgetCustomName, setCustomNameint getKnockbackStrength()
KnockBack level
of the bow that shot it.void setKnockbackStrength(int knockbackStrength)
knockbackStrength - the knockback strength valueboolean 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.
Block getAttachedBlock()
Arrow.PickupStatus getPickupStatus()
void setPickupStatus(Arrow.PickupStatus status)
status - new pickup status of this arrow.Arrow.Spigot spigot()
spigot in interface CommandSenderspigot in interface Entity@Deprecated default Arrow.PickupRule getPickupRule()
getPickupStatus() as an upstream compatible replacement for this functionArrow.PickupRule for this arrow.
This is generally Arrow.PickupRule.ALLOWED only if the arrow was
not fired from a bow with the infinity enchantment.
@Deprecated default void setPickupRule(Arrow.PickupRule rule)
setPickupStatus(PickupStatus) with Arrow.PickupStatus as an upstream compatible replacement for this functionrule - The pickup ruleCopyright © 2021. All rights reserved.