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 @NotNull org.bukkit.inventory.ItemStackpostUpdate(org.bukkit.inventory.ItemStack itemStack) Deprecated, for removal: This API element is subject to removal in a future version.default @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
-
postUpdate
@NotNull @Deprecated(forRemoval=true, since="1.19") default @NotNull org.bukkit.inventory.ItemStack postUpdate(org.bukkit.inventory.ItemStack itemStack) Deprecated, for removal: This API element is subject to removal in a future version.Returns the ItemStack modified after Nexo attempts to modify it- Parameters:
itemStack- The ItemStack Nexo has updated- Returns:
- The updated ItemStack
-
postUpdate(String itemId, ItemStack itemStack, ItemStack preUpdateItemStack)