接口 CrossbowMeta
代表弩.
-
方法概要
修饰符和类型方法说明void
向本弩装填一个抛射物.返回弩装填的抛射物的不可变列表.boolean
返回弩是否装填了抛射物.void
setChargedProjectiles
(@Nullable List<ItemStack> projectiles) 设置弩装填的抛射物.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, clone, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setUnbreakable, setVersion
从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
方法详细资料
-
hasChargedProjectiles
boolean hasChargedProjectiles()返回弩是否装填了抛射物.原文: Returns whether the item has any charged projectiles.
- 返回:
- 弩是否装填了抛射物
-
getChargedProjectiles
返回弩装填的抛射物的不可变列表.原文: Returns an immutable list of the projectiles charged on this item.
- 返回:
- 装填的抛射物
-
setChargedProjectiles
设置弩装填的抛射物. 为 null 时移除所有抛射物.原文: Sets the projectiles charged on this item. Removes all projectiles when given null.
- 参数:
projectiles
- 要装填的抛射物- 抛出:
IllegalArgumentException
- 如果任意一个抛射物不是箭或烟花火箭
-
addChargedProjectile
向本弩装填一个抛射物.原文: Adds a charged projectile to this item.
- 参数:
item
- 抛射物- 抛出:
IllegalArgumentException
- 若抛射物不是箭或烟花火箭
-