接口 AbstractArrow
- 所有超级接口:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Projectile
,ServerOperator
- 所有已知子接口:
Arrow
,SpectralArrow
,TippedArrow
,Trident
原文: Represents an arrow.
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot
-
方法概要
修饰符和类型方法说明获得这支箭连接的方块.double
获得此箭将造成的基本伤害值.getItem()
Gets the ItemStack which will be picked up from this arrow.int
已过时。a function of the firing weapon获得此箭的拾起状态.int
获得此箭能够穿透实体的次数.Gets the ItemStack which fired this arrow.boolean
获得此箭是否能造成暴击.boolean
获得此箭是否在一个方块上.boolean
Gets if this arrow was shot from a crossbow.void
setCritical
(boolean critical) 设置此箭是否暴击.void
setDamage
(double damage) 设置此箭将造成的基本伤害值.void
Sets the ItemStack which will be picked up from this arrow.void
setKnockbackStrength
(int knockbackStrength) 已过时。a function of the firing weaponvoid
设置此箭的拾起状态.void
setPierceLevel
(int pierceLevel) 设置此箭能够穿透实体的次数.void
setShotFromCrossbow
(boolean shotFromCrossbow) 已过时。a function of the firing weapon insteadvoid
Sets the ItemStack which fired this arrow.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, 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.persistence.PersistentDataHolder
getPersistentDataContainer
从接口继承的方法 org.bukkit.entity.Projectile
doesBounce, getShooter, setBounce, setShooter
从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
getKnockbackStrength
已过时。a function of the firing weapon获得此箭的击退强度, 由射出此箭的弓箭KnockBack
等级定义.原文: Gets the knockback strength for an arrow, which is the
KnockBack
level of the bow that shot it.- 返回:
- 击退强度值
- 另请参阅:
-
setKnockbackStrength
已过时。a function of the firing weapon设定箭的击退强度.原文: Sets the knockback strength for an arrow.
- 参数:
knockbackStrength
- 击退强度值- 另请参阅:
-
getDamage
double getDamage()获得此箭将造成的基本伤害值. 普通箭默认为2.0, 附魔弓加成额外的伤害0.5 * (1 + 力量附魔等级 )
原文: Gets the base amount of damage this arrow will do. Defaults to 2.0 for a normal arrow with
0.5 * (1 + power level)
added for arrows fired from enchanted bows.- 返回:
- 基本伤害值
-
setDamage
void setDamage(double damage) 设置此箭将造成的基本伤害值.原文: Sets the base amount of damage this arrow will do.
- 参数:
damage
- 新的伤害值
-
getPierceLevel
int getPierceLevel()获得此箭能够穿透实体的次数.原文: Gets the number of times this arrow can pierce through an entity.
- 返回:
- 穿透等级
-
setPierceLevel
void setPierceLevel(int pierceLevel) 设置此箭能够穿透实体的次数. 必须在 0 至 127 次之间.原文: Sets the number of times this arrow can pierce through an entity. Must be between 0 and 127 times.
- 参数:
pierceLevel
- 新的穿透等级
-
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.
- 返回:
- 如果在方块上返回true
-
getAttachedBlock
获得这支箭连接的方块. 译注:箭插在方块上, 这个方块就是箭连接的方块.原文: Gets the block to which this arrow is attached.
- 返回:
- 返回所连接的方块, 否则返回null
-
getPickupStatus
获得此箭的拾起状态.原文: Gets the current pickup status of this arrow.
- 返回:
- 这只箭的拾起状态.
-
setPickupStatus
设置此箭的拾起状态.原文: Sets the current pickup status of this arrow.
- 参数:
status
- 新的拾起状态.
-
isShotFromCrossbow
boolean isShotFromCrossbow()Gets if this arrow was shot from a crossbow.- 返回:
- if shot from a crossbow
-
setShotFromCrossbow
已过时。a function of the firing weapon insteadSets if this arrow was shot from a crossbow.- 参数:
shotFromCrossbow
- if shot from a crossbow- 另请参阅:
-
getItem
Gets the ItemStack which will be picked up from this arrow.- 返回:
- The picked up ItemStack
-
setItem
Sets the ItemStack which will be picked up from this arrow.- 参数:
item
- ItemStack set to be picked up
-
getWeapon
Gets the ItemStack which fired this arrow.- 返回:
- The firing ItemStack
-
setWeapon
Sets the ItemStack which fired this arrow.- 参数:
item
- The firing ItemStack
-