接口 Arrow
- 所有超级接口:
AbstractArrow,CommandSender,Entity,Metadatable,Nameable,Permissible,PersistentDataHolder,Projectile,ServerOperator
- 所有已知子接口:
TippedArrow
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.AbstractArrow
AbstractArrow.PickupStatus从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明booleanaddCustomEffect(@NotNull PotionEffect effect, boolean overwrite) 添加自定义药水效果到此箭矢.void移除此箭矢的所有自定义药水效果.已过时。返回关于基础药水的药水类型.getColor()获取此箭矢的颜色.获取应用于此箭矢的所有自定义药水效果的不可变列表.boolean检查此箭矢上是否存在特定的自定义药水效果类型.boolean检查是否存在自定义药水效果.boolean从此箭矢移除自定义药水效果.void已过时。升级/延长的药水现在是独立的PotionType,请使用setBasePotionType(org.bukkit.potion.PotionType)替代.void设置底层药水类型.void设置此箭矢的颜色.从接口继承的方法 org.bukkit.entity.AbstractArrow
getAttachedBlock, getDamage, getItem, getKnockbackStrength, getPickupStatus, getPierceLevel, getWeapon, isCritical, isInBlock, isShotFromCrossbow, setCritical, setDamage, setItem, setKnockbackStrength, setPickupStatus, setPierceLevel, setShotFromCrossbow, setWeapon从接口继承的方法 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
-
方法详细资料
-
setBasePotionData
已过时。升级/延长的药水现在是独立的PotionType,请使用setBasePotionType(org.bukkit.potion.PotionType)替代.设置底层药水数据.原文:Sets the underlying potion data
- 参数:
data- 要设置的基础药水状态的 PotionData
-
getBasePotionData
已过时。升级/延长的药水现在是独立的PotionType,请使用getBasePotionType()替代.返回关于基础药水的药水数据.原文:Returns the potion data about the base potion
- 返回:
- PotionData 对象
-
setBasePotionType
设置底层药水类型.原文:Sets the underlying potion type
- 参数:
type- 要设置的基础药水状态的 PotionType
-
getBasePotionType
返回关于基础药水的药水类型.原文:Returns the potion type about the base potion
- 返回:
- PotionType 对象
-
getColor
获取此箭矢的颜色.原文:Gets the color of this arrow.
- 返回:
- 箭矢的
Color,如果未设置颜色则为 null
-
setColor
设置此箭矢的颜色. 将作为其粒子的着色应用.原文:Sets the color of this arrow. Will be applied as a tint to its particles.
- 参数:
color- 箭矢颜色,null 表示清除颜色
-
hasCustomEffects
boolean hasCustomEffects()检查是否存在自定义药水效果.原文:Checks for the presence of custom potion effects.
- 返回:
- 如果应用了自定义药水效果则为 true
-
getCustomEffects
获取应用于此箭矢的所有自定义药水效果的不可变列表.插件应在调用此方法前检查 hasCustomEffects() 是否返回 true.
原文:Gets an immutable list containing all custom potion effects applied to this arrow.
Plugins should check that hasCustomEffects() returns true before calling this method.
- 返回:
- 自定义药水效果的不可变列表
-
addCustomEffect
添加自定义药水效果到此箭矢.原文:Adds a custom potion effect to this arrow.
- 参数:
effect- 要添加的药水效果overwrite- 如果为 true,则覆盖同类型的现有效果- 返回:
- 如果因此次调用添加了效果则为 true
-
removeCustomEffect
从此箭矢移除自定义药水效果.原文:Removes a custom potion effect from this arrow.
- 参数:
type- 要移除的药水效果类型- 返回:
- 如果因此次调用移除了效果则为 true
- 抛出:
IllegalArgumentException- 如果此操作会使箭矢处于无自定义效果且药水类型为 UNCRAFTABLE 的状态
-
hasCustomEffect
检查此箭矢上是否存在特定的自定义药水效果类型.原文:Checks for a specific custom potion effect type on this arrow.
- 参数:
type- 要检查的药水效果类型- 返回:
- 如果药水有此效果则为 true
-
clearCustomEffects
void clearCustomEffects()移除此箭矢的所有自定义药水效果.原文:Removes all custom potion effects from this arrow.
- 抛出:
IllegalArgumentException- 如果此操作会使箭矢处于无自定义效果且药水类型为 UNCRAFTABLE 的状态
-
PotionType,请使用getBasePotionType()替代.