Package org.bukkit.entity
Interface Arrow
-
- All Superinterfaces:
CommandSender,Entity,Metadatable,Nameable,Permissible,Projectile,ServerOperator
- All Known Subinterfaces:
SpectralArrow,TippedArrow,Trident
public interface Arrow extends Projectile
Represents an arrow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classArrow.PickupStatusRepresents the pickup status of this arrow.static classArrow.Spigot
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockgetAttachedBlock()Gets the block to which this arrow is attached.intgetKnockbackStrength()Gets the knockback strength for an arrow, which is theKnockBacklevel of the bow that shot it.Arrow.PickupStatusgetPickupStatus()Gets the current pickup status of this arrow.booleanisCritical()Gets whether this arrow is critical.booleanisInBlock()Gets whether this arrow is in a block or not.voidsetCritical(boolean critical)Sets whether or not this arrow should be critical.voidsetKnockbackStrength(int knockbackStrength)Sets the knockback strength for an arrow.voidsetPickupStatus(Arrow.PickupStatus status)Sets the current pickup status of this arrow.Arrow.Spigotspigot()-
Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage
-
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getEntityId, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setSilent, setTicksLived, setVelocity, teleport, teleport, teleport, teleport
-
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Methods inherited from interface org.bukkit.Nameable
getCustomName, setCustomName
-
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
-
Methods inherited from interface org.bukkit.entity.Projectile
doesBounce, getShooter, setBounce, setShooter
-
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
-
-
-
Method Detail
-
getKnockbackStrength
int getKnockbackStrength()
Gets the knockback strength for an arrow, which is theKnockBacklevel of the bow that shot it.- Returns:
- the knockback strength value
-
setKnockbackStrength
void setKnockbackStrength(int knockbackStrength)
Sets the knockback strength for an arrow.- Parameters:
knockbackStrength- the knockback strength value
-
isCritical
boolean isCritical()
Gets whether this arrow is critical.Critical arrows have increased damage and cause particle effects.
Critical arrows generally occur when a player fully draws a bow before firing.
- Returns:
- true if it is critical
-
setCritical
void setCritical(boolean critical)
Sets whether or not this arrow should be critical.- Parameters:
critical- whether or not it should be critical
-
isInBlock
boolean isInBlock()
Gets whether this arrow is in a block or not.Arrows in a block are motionless and may be picked up by players.
- Returns:
- true if in a block
-
getAttachedBlock
Block getAttachedBlock()
Gets the block to which this arrow is attached.- Returns:
- the attached block or null if not attached
-
getPickupStatus
Arrow.PickupStatus getPickupStatus()
Gets the current pickup status of this arrow.- Returns:
- the pickup status of this arrow.
-
setPickupStatus
void setPickupStatus(Arrow.PickupStatus status)
Sets the current pickup status of this arrow.- Parameters:
status- new pickup status of this arrow.
-
spigot
Arrow.Spigot spigot()
- Specified by:
spigotin interfaceCommandSender- Specified by:
spigotin interfaceEntity
-
-