接口 Arrow
- 所有超级接口:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,Projectile
,ServerOperator
- 所有已知子接口:
SpectralArrow
,TippedArrow
表示一只箭矢.
-
嵌套类概要
-
方法概要
修饰符和类型方法说明获取该箭矢附着在哪个方块上.int
获取箭头的击退强度,这表示附魔力量
等级.获取此箭矢的当前拾取状态.boolean
获取此箭矢是否产生暴击.boolean
获取此箭矢是否嵌入于一个方块中.void
setCritical
(boolean critical) 设置这个箭矢是否是否产生了暴击.void
setKnockbackStrength
(int knockbackStrength) 设置箭矢的附魔击退等级.void
setPickupStatus
(Arrow.PickupStatus status) 设置此箭矢的当前拾取状态.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage
从接口继承的方法 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, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, teleport, teleport, teleport, teleport
从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName
从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
从接口继承的方法 org.bukkit.entity.Projectile
doesBounce, getShooter, setBounce, setShooter
从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
getKnockbackStrength
int getKnockbackStrength()获取箭头的击退强度,这表示附魔力量
等级.原文:Gets the knockback strength for an arrow, which is the
KnockBack
level of the bow that shot it.mine- 返回:
- 附魔击退等级
-
setKnockbackStrength
void setKnockbackStrength(int knockbackStrength) 设置箭矢的附魔击退等级.原文: Sets the knockback strength for an arrow.
- 参数:
knockbackStrength
- 附魔击退等级
-
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.
- 返回:
- 如果是暴击箭矢则返回true
-
setCritical
void setCritical(boolean critical) 设置这个箭矢是否是否产生了暴击.原文:Sets whether or not this arrow should be critical.
- 参数:
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.
- 返回:
- 此箭矢是否嵌入于方块中
-
getAttachedBlock
Block getAttachedBlock()获取该箭矢附着在哪个方块上.原文:Gets the block to which this arrow is attached.
- 返回:
- 箭矢附着(嵌入)的方块,若箭矢没有嵌入于方块中返回null
-
getPickupStatus
Arrow.PickupStatus getPickupStatus()获取此箭矢的当前拾取状态.原文:Gets the current pickup status of this arrow.
- 返回:
- 此箭矢的拾取状态
-
setPickupStatus
设置此箭矢的当前拾取状态.原文:Sets the current pickup status of this arrow.
- 参数:
status
- 此箭矢新的拾取状态
-