Package com.nexomc.nexo.items
Interface UpdateCallback
public interface UpdateCallback
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull org.bukkit.inventory.ItemStackpostUpdate(String itemId, org.bukkit.inventory.ItemStack itemStack, org.bukkit.inventory.ItemStack preUpdateItemStack) Returns the ItemStack modified after Nexo has updated itdefault @Nullable org.bukkit.inventory.ItemStackpreUpdate(org.bukkit.inventory.ItemStack itemStack) Returns the ItemStack modified before Nexo attempts to modify it
-
Method Details
-
preUpdate
@Nullable default @Nullable org.bukkit.inventory.ItemStack preUpdate(org.bukkit.inventory.ItemStack itemStack) Returns the ItemStack modified before Nexo attempts to modify it- Parameters:
itemStack- The Item Nexo will update- Returns:
- If this returns null, Nexo will not update the ItemStack
-
postUpdate
@NotNull default @NotNull org.bukkit.inventory.ItemStack postUpdate(String itemId, org.bukkit.inventory.ItemStack itemStack, org.bukkit.inventory.ItemStack preUpdateItemStack) Returns the ItemStack modified after Nexo has updated it- Parameters:
itemId- The ID of the NexoItem being updateditemStack- The ItemStack Nexo has updatedpreUpdateItemStack- The ItemStack object before Nexo updated it- Returns:
- The updated ItemStack
-