Skip to content

Commit

Permalink
Added the ability to disable a slot in the GUI (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0inx authored Jun 15, 2024
1 parent e219201 commit a7f67af
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public Inventory getInventory() {
public void addContent(Inventory inventory) {
InventoryUtils.fillInventory(inventory, inventoryConfig.background);

inventoryConfig.items.values().forEach(item -> inventory.setItem(item.slot, ItemStackUtils.makeItem(item)));
inventoryConfig.items.values().forEach(item -> {
if(item.slot >= 0) {
inventory.setItem(item.slot, ItemStackUtils.makeItem(item));
}
});
}

@Override
Expand Down

0 comments on commit a7f67af

Please sign in to comment.