Add slot clearing api
This commit is contained in:
parent
63aa8b7a20
commit
5cbb05d30d
1 changed files with 11 additions and 0 deletions
|
@ -30,6 +30,17 @@ public class WrapperEntityEquipment {
|
|||
Arrays.fill(equipment, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
|
||||
public void clearSlot(@NotNull EquipmentSlot slot) {
|
||||
equipment[slot.ordinal()] = ItemStack.EMPTY;
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void clearAll() {
|
||||
Arrays.fill(equipment, ItemStack.EMPTY);
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void setHelmet(@Nullable ItemStack itemStack) {
|
||||
equipment[5] = itemStack == null ? ItemStack.EMPTY : itemStack;
|
||||
refresh();
|
||||
|
|
Loading…
Reference in a new issue