mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
SPIGOT-4802: Add CrossbowMeta
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d41f921727
commit
191b0147cd
1 changed files with 43 additions and 0 deletions
|
@ -0,0 +1,43 @@
|
|||
package org.bukkit.inventory.meta;
|
||||
|
||||
import java.util.List;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface CrossbowMeta extends ItemMeta {
|
||||
|
||||
/**
|
||||
* Returns whether the item has any charged projectiles.
|
||||
*
|
||||
* @return whether charged projectiles are present
|
||||
*/
|
||||
boolean hasChargedProjectiles();
|
||||
|
||||
/**
|
||||
* Returns an immutable list of the projectiles charged on this item.
|
||||
*
|
||||
* @return charged projectiles
|
||||
*/
|
||||
@NotNull
|
||||
List<ItemStack> getChargedProjectiles();
|
||||
|
||||
/**
|
||||
* Sets the projectiles charged on this item.
|
||||
*
|
||||
* Removes all projectiles when given null.
|
||||
*
|
||||
* @param projectiles
|
||||
* @throws IllegalArgumentException if one of the projectiles is not an
|
||||
* arrow
|
||||
*/
|
||||
void setChargedProjectiles(@Nullable List<ItemStack> projectiles);
|
||||
|
||||
/**
|
||||
* Adds a charged projectile to this item.
|
||||
*
|
||||
* @param item projectile
|
||||
* @throws IllegalArgumentException if the projectile is not an arrow
|
||||
*/
|
||||
void addChargedProjectile(@NotNull ItemStack item);
|
||||
}
|
Loading…
Add table
Reference in a new issue