Modify item creation
Modify the item creation
The creation will loop through all the addons you will get the most recent ItemStack but it can also be changed after your changes by other addons.
// Modify item creation, return the modified item, in the params you get the Item used to generated the ItemStack and the newest ItemStack generated.
provider.addAddon(
new PluginAddon("PluginName", XMaterial.WRITABLE_BOOK.get())
.onItemCreate(new ItemCreationRunnable() {
@Override
public ItemStack onCreate(Item used, ItemStack created) {
return created;
}
})
);// Adding priority (Loop is highest to lowest)
.onItemCreate(@AddonModifier(priority = AddonPriority.LOW) new ItemCreationRunnable() {
@Override
public ItemStack onCreate(Item used, ItemStack created) {
return created;
}
})Last updated