From e850144b070c85d6b21da1f6b1f457a55463f161 Mon Sep 17 00:00:00 2001 From: Parker Hawke Date: Sun, 16 Aug 2020 11:21:08 +1000 Subject: [PATCH] #726: Add Inventory#isEmpty() --- .../org/bukkit/craftbukkit/inventory/CraftInventory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 98aea6b291..28b8f5f618 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -248,6 +248,11 @@ public class CraftInventory implements Inventory { return -1; } + @Override + public boolean isEmpty() { + return inventory.isEmpty(); + } + public int firstPartial(Material material) { Validate.notNull(material, "Material cannot be null"); material = CraftLegacy.fromLegacy(material);