Interface UpdateCallback


public interface UpdateCallback
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    default @Nullable org.bukkit.inventory.ItemStack
    preUpdate(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 updated
      itemStack - The ItemStack Nexo has updated
      preUpdateItemStack - The ItemStack object before Nexo updated it
      Returns:
      The updated ItemStack