Skip to content

Commit

Permalink
Add <in@inventory.first_empty>
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Aug 4, 2015
1 parent 3342bfa commit 344bbc6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dInventory.java
Expand Up @@ -1497,6 +1497,17 @@ else if (item != null && item.hasItemMeta() && item.getItemMeta().hasDisplayName
}
}

// <--[tag]
// @attribute <in@inventory.first_empty>
// @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 <in@inventory.find.material[<material>]>
// @returns Element(Number)
Expand Down

0 comments on commit 344bbc6

Please sign in to comment.