Package org.bukkit.inventory.meta
Interface CrossbowMeta
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
,PersistentDataViewHolder
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a charged projectile to this item.Returns an immutable list of the projectiles charged on this item.boolean
Returns whether the item has any charged projectiles.void
setChargedProjectiles
(@Nullable List<ItemStack> projectiles) Sets the projectiles charged on this item.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, clone, displayName, displayName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getLoreComponents, getMaxStackSize, getPlaceableKeys, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasPlaceableKeys, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setLoreComponents, setMaxStackSize, setPlaceableKeys, setRarity, setTool, setUnbreakable, setVersion
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Method Details
-
hasChargedProjectiles
boolean hasChargedProjectiles()Returns whether the item has any charged projectiles.- Returns:
- whether charged projectiles are present
-
getChargedProjectiles
Returns an immutable list of the projectiles charged on this item.- Returns:
- charged projectiles
-
setChargedProjectiles
Sets the projectiles charged on this item. Removes all projectiles when given null.- Parameters:
projectiles
- the projectiles to set- Throws:
IllegalArgumentException
- if one of the projectiles is empty
-
addChargedProjectile
Adds a charged projectile to this item.- Parameters:
item
- projectile- Throws:
IllegalArgumentException
- if the projectile is empty
-