How do I set an ItemStack in an anvil inventory? I need the method to be supported for versions 1.8.8-1.14.4. I can create the inventory, but can't set items. This is what I have:
void open(Player player) {
Inventory createKitGUI = Bukkit.createInventory(null, InventoryType.ANVIL);
createKitGUI.setItem(1, new ItemStack(XMaterial.PAPER.parseMaterial()));
player.openInventory(createKitGUI);
}
I've tried setting in slots 0 and 1 but it doesn't work. 0 and 1 are the first 2 slots in the anvil inventory.