Interface CrossbowMeta

All Superinterfaces:
Cloneable, ConfigurationSerializable, ItemMeta, PersistentDataHolder, PersistentDataViewHolder

public interface CrossbowMeta extends ItemMeta
  • Method Details

    • hasChargedProjectiles

      boolean hasChargedProjectiles()
      Returns whether the item has any charged projectiles.
      Returns:
      whether charged projectiles are present
    • getChargedProjectiles

      @NotNull @NotNull List<ItemStack> getChargedProjectiles()
      Returns an immutable list of the projectiles charged on this item.
      Returns:
      charged projectiles
    • setChargedProjectiles

      void setChargedProjectiles(@Nullable @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 empty
    • addChargedProjectile

      void addChargedProjectile(@NotNull @NotNull ItemStack item)
      Adds a charged projectile to this item.
      Parameters:
      item - projectile
      Throws:
      IllegalArgumentException - if the projectile is empty