-
-
Save Redrield/eda048556ac05c4d03f4fd61b9034fb5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inventory inv = InventoryBuilder.create("Hello", 9) | |
.addItem(Material.DIAMOND_AXE, 1, stack -> { | |
stack.withMeta(meta -> { | |
meta.setDisplayName("Hello world"); | |
meta.setLore(Arrays.asList("Hello", "World")); | |
}); | |
stack.getInner().addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 1000); | |
stack.onClick(player -> { | |
player.sendMessage("Executed"); | |
}); | |
}) | |
.addItem(Material.WOOD_SWORD, 1, 8, stack -> { | |
stack.withMeta(meta -> { | |
meta.setDisplayName("Hello 2"); | |
}); | |
stack.onClick(Player::closeInventory); | |
}).build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment