mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
#562: Add API to set equipment silently
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
ddabe8f3b9
commit
95c9d5945f
@ -17,6 +17,15 @@ public interface EntityEquipment {
|
||||
*/
|
||||
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets the ItemStack at the given equipment slot in the inventory.
|
||||
*
|
||||
@ -42,6 +51,14 @@ public interface EntityEquipment {
|
||||
*/
|
||||
void setItemInMainHand(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Sets the item the entity is holding in their main hand.
|
||||
*
|
||||
* @param item The item to put into the entities hand
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
void setItemInMainHand(@Nullable ItemStack item, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets a copy of the item the entity is currently holding
|
||||
* in their off hand.
|
||||
@ -58,6 +75,14 @@ public interface EntityEquipment {
|
||||
*/
|
||||
void setItemInOffHand(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Sets the item the entity is holding in their off hand.
|
||||
*
|
||||
* @param item The item to put into the entities hand
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
void setItemInOffHand(@Nullable ItemStack item, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets a copy of the item the entity is currently holding
|
||||
*
|
||||
@ -98,6 +123,14 @@ public interface EntityEquipment {
|
||||
*/
|
||||
void setHelmet(@Nullable ItemStack helmet);
|
||||
|
||||
/**
|
||||
* Sets the helmet worn by the entity
|
||||
*
|
||||
* @param helmet The helmet to put on the entity
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
void setHelmet(@Nullable ItemStack helmet, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets a copy of the chest plate currently being worn by the entity
|
||||
*
|
||||
@ -113,6 +146,14 @@ public interface EntityEquipment {
|
||||
*/
|
||||
void setChestplate(@Nullable ItemStack chestplate);
|
||||
|
||||
/**
|
||||
* Sets the chest plate worn by the entity
|
||||
*
|
||||
* @param chestplate The chest plate to put on the entity
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
void setChestplate(@Nullable ItemStack chestplate, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets a copy of the leggings currently being worn by the entity
|
||||
*
|
||||
@ -128,6 +169,14 @@ public interface EntityEquipment {
|
||||
*/
|
||||
void setLeggings(@Nullable ItemStack leggings);
|
||||
|
||||
/**
|
||||
* Sets the leggings worn by the entity
|
||||
*
|
||||
* @param leggings The leggings to put on the entity
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
void setLeggings(@Nullable ItemStack leggings, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets a copy of the boots currently being worn by the entity
|
||||
*
|
||||
@ -143,6 +192,14 @@ public interface EntityEquipment {
|
||||
*/
|
||||
void setBoots(@Nullable ItemStack boots);
|
||||
|
||||
/**
|
||||
* Sets the boots worn by the entity
|
||||
*
|
||||
* @param boots The boots to put on the entity
|
||||
* @param silent whether or not the equip sound should be silenced
|
||||
*/
|
||||
void setBoots(@Nullable ItemStack boots, boolean silent);
|
||||
|
||||
/**
|
||||
* Gets a copy of all worn armor
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user