InventoryBuilder
Since 1.0.0
import net.codersky.mcutils.builders.InventoryBuilder;
// Creates a 2 row inventory full of emeralds and diamonds.
Inventory inv = new InventoryBuilder("&6Title", 2)
// Fills first row with emeralds.
.set(new ItemStack(Material.EMERALD), MCNumbers.range(0, 8))
// Replaces the remaining empty slots with diamonds.
.replaceAll(Material.AIR, new ItemStack(Material.DIAMOND))
.build();Last updated