Add slot clearing api

This commit is contained in:
Tofaa 2024-05-09 23:50:43 +04:00
parent 63aa8b7a20
commit 5cbb05d30d

View file

@ -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();