mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-05 10:20:11 +01:00
Allow unequipping of certain slots
This commit is contained in:
parent
352ec56f5e
commit
34398f09d5
@ -104,13 +104,13 @@ public class GenericEquipperGUI extends InventoryMenuPage {
|
||||
|
||||
@ClickHandler(slot = { 1, 5 })
|
||||
public void setBoots(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
|
||||
set(EquipmentSlot.BOOTS, event, (type) -> type.name().endsWith("BOOTS"));
|
||||
set(EquipmentSlot.BOOTS, event, (type) -> type == Material.AIR || type.name().endsWith("BOOTS"));
|
||||
}
|
||||
|
||||
@ClickHandler(slot = { 1, 3 })
|
||||
public void setChest(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
|
||||
set(EquipmentSlot.CHESTPLATE, event,
|
||||
(type) -> type.name().endsWith("CHESTPLATE") || type.name().equals("ELYTRA"));
|
||||
(type) -> type == Material.AIR || type.name().endsWith("CHESTPLATE") || type.name().equals("ELYTRA"));
|
||||
}
|
||||
|
||||
@ClickHandler(slot = { 1, 0 })
|
||||
@ -125,7 +125,7 @@ public class GenericEquipperGUI extends InventoryMenuPage {
|
||||
|
||||
@ClickHandler(slot = { 1, 4 })
|
||||
public void setLeggings(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
|
||||
set(EquipmentSlot.LEGGINGS, event, (type) -> type.name().endsWith("LEGGINGS"));
|
||||
set(EquipmentSlot.LEGGINGS, event, (type) -> type == Material.AIR || type.name().endsWith("LEGGINGS"));
|
||||
}
|
||||
|
||||
@ClickHandler(slot = { 1, 1 })
|
||||
|
Loading…
Reference in New Issue
Block a user