geforkt von Mirrors/Paper
SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
By: blablubbabc <lukas@wirsindwir.de>
Dieser Commit ist enthalten in:
Ursprung
f8ce884be6
Commit
40d09ae808
@ -9,6 +9,23 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
*/
|
*/
|
||||||
public interface EntityEquipment {
|
public interface EntityEquipment {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the ItemStack at the given equipment slot in the inventory.
|
||||||
|
*
|
||||||
|
* @param slot the slot to put the ItemStack
|
||||||
|
* @param item the ItemStack to set
|
||||||
|
*/
|
||||||
|
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the ItemStack at the given equipment slot in the inventory.
|
||||||
|
*
|
||||||
|
* @param slot the slot to get the ItemStack
|
||||||
|
* @return the ItemStack in the given slot
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
public ItemStack getItem(@NotNull EquipmentSlot slot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a copy of the item the entity is currently holding
|
* Gets a copy of the item the entity is currently holding
|
||||||
* in their main hand.
|
* in their main hand.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren