接口 AbstractArrow
- 所有超级接口:
CommandSender,Entity,Metadatable,Nameable,Permissible,PersistentDataHolder,Projectile,ServerOperator
- 所有已知子接口:
Arrow,SpectralArrow,TippedArrow,Trident
原文: Represents an arrow.
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明Gets the block to which this arrow is attached.double获得此箭将造成的基本伤害值.getItem()获取此箭被拾起时将获得的 ItemStack.int已过时。发射武器的功能Gets the current pickup status of this arrow.int获得此箭能够穿透实体的次数.获取发射此箭的 ItemStack.booleanGets whether this arrow is critical.booleanGets whether this arrow is in a block or not.boolean获得此箭是否由弩射出.voidsetCritical(boolean critical) Sets whether or not this arrow should be critical.voidsetDamage(double damage) 设置此箭将造成的基本伤害值.void设置此箭被拾起时将获得的 ItemStack.voidsetKnockbackStrength(int knockbackStrength) 已过时。发射武器的功能voidSets the current pickup status of this arrow.voidsetPierceLevel(int pierceLevel) Sets the number of times this arrow can pierce through an entity.voidsetShotFromCrossbow(boolean shotFromCrossbow) 已过时。改用发射武器的功能void设置发射此箭的 ItemStack.从接口继承的方法 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
已过时。发射武器的功能获得此箭的击退强度, 由射出此箭的弓箭KnockBack等级定义.原文: Gets the knockback strength for an arrow, which is the
KnockBacklevel of the bow that shot it.- 返回:
- 击退强度值
- 另请参阅:
-
setKnockbackStrength
已过时。发射武器的功能设定箭的击退强度.原文: 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) Sets the number of times this arrow can pierce through an entity. Must be between 0 and 127 times.- 参数:
pierceLevel- new pierce level
-
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 if it is critical
-
setCritical
void setCritical(boolean critical) Sets whether or not this arrow should be critical.- 参数:
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.
- 返回:
- true if in a block
-
getAttachedBlock
Gets the block to which this arrow is attached.- 返回:
- the attached block or null if not attached
-
getPickupStatus
Gets the current pickup status of this arrow.- 返回:
- the pickup status of this arrow.
-
setPickupStatus
Sets the current pickup status of this arrow.- 参数:
status- new pickup status of this arrow.
-
isShotFromCrossbow
boolean isShotFromCrossbow()获得此箭是否由弩射出.原文: Gets if this arrow was shot from a crossbow.
- 返回:
- 如果由弩射出则返回true
-
setShotFromCrossbow
已过时。改用发射武器的功能设置此箭是否由弩射出.原文: Sets if this arrow was shot from a crossbow.
- 参数:
shotFromCrossbow- 是否由弩射出- 另请参阅:
-
getItem
获取此箭被拾起时将获得的 ItemStack.原文: Gets the ItemStack which will be picked up from this arrow.
- 返回:
- 被拾起的 ItemStack
-
setItem
设置此箭被拾起时将获得的 ItemStack.原文: Sets the ItemStack which will be picked up from this arrow.
- 参数:
item- 被拾起时的 ItemStack
-
getWeapon
获取发射此箭的 ItemStack.原文: Gets the ItemStack which fired this arrow.
- 返回:
- 发射此箭的 ItemStack
-
setWeapon
设置发射此箭的 ItemStack.原文: Sets the ItemStack which fired this arrow.
- 参数:
item- 发射此箭的 ItemStack
-