Package org.bukkit.inventory.meta
Interface CrossbowMeta
-
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
public interface CrossbowMeta extends ItemMeta
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bukkit.inventory.meta.ItemMeta
ItemMeta.Spigot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChargedProjectile(ItemStack item)
Adds a charged projectile to this item.List<ItemStack>
getChargedProjectiles()
Returns an immutable list of the projectiles charged on this item.boolean
hasChargedProjectiles()
Returns whether the item has any charged projectiles.void
setChargedProjectiles(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, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setLocalizedName, setLore, setUnbreakable, setVersion, spigot
-
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
-
-
-
Method Detail
-
hasChargedProjectiles
boolean hasChargedProjectiles()
Returns whether the item has any charged projectiles.- Returns:
- whether charged projectiles are present
-
getChargedProjectiles
@NotNull List<ItemStack> getChargedProjectiles()
Returns an immutable list of the projectiles charged on this item.- Returns:
- charged projectiles
-
setChargedProjectiles
void setChargedProjectiles(@Nullable List<ItemStack> projectiles)
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 not an arrow or firework rocket
-
addChargedProjectile
void addChargedProjectile(@NotNull ItemStack item)
Adds a charged projectile to this item.- Parameters:
item
- projectile- Throws:
IllegalArgumentException
- if the projectile is not an arrow or firework rocket
-
-