diff --git a/src/main/java/net/aufdemrand/denizen/objects/dInventory.java b/src/main/java/net/aufdemrand/denizen/objects/dInventory.java index 98089e2736..f394256962 100644 --- a/src/main/java/net/aufdemrand/denizen/objects/dInventory.java +++ b/src/main/java/net/aufdemrand/denizen/objects/dInventory.java @@ -1497,6 +1497,17 @@ else if (item != null && item.hasItemMeta() && item.getItemMeta().hasDisplayName } } + // <--[tag] + // @attribute + // @returns Element(Number) + // @description + // Returns the location of the first empty slot. + // Returns -1 if the inventory is full. + // --> + if (attribute.startsWith("first_empty")) { + return new Element(firstEmpty(0)).getAttribute(attribute.fulfill(1)); + } + // <--[tag] // @attribute ]> // @returns Element(Number)