Example usage

This is just an example module that provides options to customize various aspects, such as NBT data, banner patterns, and modifying firework stars to set banner patterns on shields.

Create single item

Here are the options you can use to create a single item. The string at the bottom is recommended for supporting older Minecraft versions prior to 1.13. You can set the display name, lore, and explore more options within the CreateItemStack class.

Example 1:

ItemStack itemStack = getItemCreator().of(new ItemStack(Material.LIGHT_GRAY_STAINED_GLASS)).makeItemStack();

Example 2:

ItemStack itemStack = getItemCreator().of(Material.LIGHT_GRAY_STAINED_GLASS).makeItemStack();

Example 3:

ItemStack itemStack = getItemCreator().of("LIGHT_GRAY_STAINED_GLASS").makeItemStack();

Create Array of Items

Here is an example of converting an array of items. If you set the name, lore, or other data for one item, all items in the array will share that data if they support it.

Example 1:

List<Material> materials = new ArrayList<>();
materials.add(Material.LIGHT_GRAY_STAINED_GLASS);
ItemStack[] itemStack = getItemCreator().of(materials).makeItemStackArray();

Example 2:

List<String> materials = new ArrayList<>();
materials.add("LIGHT_GRAY_STAINED_GLASS");
ItemStack[] itemStack = getItemCreator().of(materials).makeItemStackArray();

Last updated