- Tested Minecraft Versions:
- Source Code:
Create advanced ItemStacks in one line!
The ItemBuilder class should work without major modification in the latest version of Spigot. However, only 1.8 to 1.10 are currently supported actively.
ItemBuilder is an API class with which you can build advanced ItemStacks in just one line. Supported features contain ItemMeta manipulation and NBT tags, even Item- & SkullMetas!
- Class, not an actual jar. You can directly implement this API in your plugin's source code.
- Item- & SkullMeta supported.
- NBT Tags supported (Deprecated in v1.8.3) .
- Extra Methods like glow() implemented.
- Highly customizeable.
- JSON and config reading / writing.
- Create an instance of the ItemBuilderCode (Java):ItemBuilder builder = new ItemBuilder(Material.GLOWSTONE)
- Set the metas you want, for exampleCode (Java):builder.setDisplayname("§6Glowy Glowstone");
- (Optional) Access the "Unsafe" class usingand set/get NBT Tags:Code (Java):builder.unsafe()Code (Java):builder.unsafe().setString("key", "value");
- Get back the Bukkit ItemStack withCode (Java):builder.build()
You can also do all of these steps in just one line:
Code (Java):ItemStack item = new ItemBuilder(Material.GLOWSTONE).displayname("§6Glowy Glowstone").unsafe().setString("key", "value").builder().build();
How to install
- Click the Download Button
- Press CTRL + A
- Press CTRL + C or right click -> Copy
- Go into your IDE in a blank class named "ItemBuilder" and press CTRL + V or right click -> Paste
- Fix the package name and enjoy a working ItemBuilder class
The Project is licensed under the Apache License 2.0. You can view the complete license in the LICENSE file in the main root of the GitLab repo.
If you encounter problems or have suggestions, feel free to open an issue in GitLab or send me a PM here on Spigot.
Keep in mind that negative reviews due to unreported bugs or unexpected behaviour are unconstructive and demotivating. Please open an issue