Interface UpdateCallback

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      ItemStack preUpdate(ItemStack itemStack) Returns the ItemStack modified before Nexo attempts to modify it
      ItemStack postUpdate(String itemId, ItemStack itemStack, ItemStack preUpdateItemStack) Returns the ItemStack modified after Nexo has updated it
      ItemStack postUpdate(ItemStack itemStack) Returns the ItemStack modified after Nexo attempts to modify it
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • preUpdate

        @Nullable() ItemStack preUpdate(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() ItemStack postUpdate(String itemId, ItemStack itemStack, 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

      • postUpdate

        @NotNull()@Deprecated(forRemoval = true, since = "1.19") ItemStack postUpdate(ItemStack itemStack)

        Returns the ItemStack modified after Nexo attempts to modify it

        Parameters:
        itemStack - The ItemStack Nexo has updated
        Returns:

        The updated ItemStack