From 4825f8d4c1a5b0b7e0f329d19cba464569bf66fd Mon Sep 17 00:00:00 2001 From: TheMode Date: Tue, 24 Aug 2021 08:26:04 +0200 Subject: [PATCH] Add EquipmentHandler#hasEquipment --- .../java/net/minestom/server/inventory/EquipmentHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/minestom/server/inventory/EquipmentHandler.java b/src/main/java/net/minestom/server/inventory/EquipmentHandler.java index 8d6562132..0103c63ec 100644 --- a/src/main/java/net/minestom/server/inventory/EquipmentHandler.java +++ b/src/main/java/net/minestom/server/inventory/EquipmentHandler.java @@ -183,6 +183,10 @@ public interface EquipmentHandler { } } + default boolean hasEquipment(@NotNull EquipmentSlot slot) { + return !getEquipment(slot).isAir(); + } + /** * Sends a specific equipment to viewers. *