Package com.nexomc.nexo.items
Interface UpdateCallback
-
- All Implemented Interfaces:
public interface UpdateCallback
-
-
Method Summary
Modifier and Type Method Description ItemStackpreUpdate(ItemStack itemStack)Returns the ItemStack modified before Nexo attempts to modify it ItemStackpostUpdate(String itemId, ItemStack itemStack, ItemStack preUpdateItemStack)Returns the ItemStack modified after Nexo has updated it ItemStackpostUpdate(ItemStack itemStack)Returns the ItemStack modified after Nexo attempts to modify it -
-
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 updateditemStack- The ItemStack Nexo has updatedpreUpdateItemStack- 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
-
-
-
-