SimpleItemBuilder
A simple API class to create complicated ItemStacks with only one line of code
This is an API for Developers not a plugin!
>> For Bukkit/Spigot 1.8 - 1.17
How to use?
- Just download the Item class here and copy it into your project
- done!
Features
- Create banners
- Use player and custom skulls
- Hide enchantments
- Set items unbreakable - Only for Spigot (any version) or Bukkit (1.11 and above)
- Brew custom potions
- Use custom enchantments
- ...
Examples
Code (Java):
// Create a simple potato
ItemStack item
=
new Item
(Material.
POTATO
).
build
(
)
;
Code (Java):
// Let's give the potato a name
ItemStack funnyItem
=
new Item
(Material.
POTATO
).
setDisplayname
(
"§6Funny potato"
).
build
(
)
;
Code (Java):
// A player head
ItemStack playerHead
=
new Item
(Material.
PLAYER_HEAD,
(
short
)
3, Item.
ItemMeta.
ItemMeta
).
setOwner
(player.
getUniqueId
(
)
).
build
(
)
;
Code (Java):
// And whatever this is
ItemStack customHead
=
new Item
(
"723863981895b104c1b29c9f5f427ae0a0ede464584587068fb1593a27d"
).
build
(
)
;
Code (Java):
// Here's something more complicated...
ItemStack fast
=
new Item
(Material.
GOLDEN_PICKAXE
).
setDisplayname
(
"§b§o§k..§e§l Fast §b§o§k.."
)
.
setLore
(
"§6§lSwoooooshhhh",
"",
"§7Efficiency §7§k99999"
)
.
addEnchantment
(Enchantment.
DIG_SPEED,
10
)
.
hideFlags
(
)
.
setUnbreakable
(
)
.
build
(
)
;
Bug / Feature reuests: