Uses of Interface
xyz.xenondevs.invui.inventory.event.UpdateReason
Package
Description
-
Uses of UpdateReason in xyz.xenondevs.invui.gui
Modifier and TypeMethodDescriptionboolean
AbstractGui.handleItemDrag
(UpdateReason updateReason, int slot, org.bukkit.inventory.ItemStack oldStack, org.bukkit.inventory.ItemStack newStack) Handles an item drag on a single slot of thisAbstractGui
.protected int
AbstractGui.putIntoFirstInventory
(UpdateReason updateReason, org.bukkit.inventory.ItemStack itemStack, Inventory... ignored) Puts anItemStack
into the firstInventory
that accepts it. -
Uses of UpdateReason in xyz.xenondevs.invui.inventory
Modifier and TypeMethodDescriptionint
Inventory.addItem
(@Nullable UpdateReason updateReason, @NotNull org.bukkit.inventory.ItemStack itemStack) Adds anItemStack
to theInventory
.int
Inventory.addItemAmount
(@Nullable UpdateReason updateReason, int slot, int amount) Adds a specific amount to anItemStack
on a slot while respecting the maximum allowed stack size on that slot.void
CompositeInventory.callPostUpdateEvent
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack previousItemStack, @Nullable org.bukkit.inventory.ItemStack newItemStack) void
Inventory.callPostUpdateEvent
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack previousItemStack, @Nullable org.bukkit.inventory.ItemStack newItemStack) Creates anItemPostUpdateEvent
and calls theInventory.postUpdateHandler
to handle it.void
ObscuredInventory.callPostUpdateEvent
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack previousItemStack, @Nullable org.bukkit.inventory.ItemStack newItemStack) CompositeInventory.callPreUpdateEvent
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack previousItemStack, @Nullable org.bukkit.inventory.ItemStack newItemStack) Inventory.callPreUpdateEvent
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack previousItemStack, @Nullable org.bukkit.inventory.ItemStack newItemStack) Creates anItemPreUpdateEvent
and calls theInventory.preUpdateHandler
to handle it.ObscuredInventory.callPreUpdateEvent
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack previousItemStack, @Nullable org.bukkit.inventory.ItemStack newItemStack) int
Inventory.collectSimilar
(@Nullable UpdateReason updateReason, @NotNull org.bukkit.inventory.ItemStack itemStack) Finds allItemStack
s similar to the providedItemStack
and removes them from their slot until the amount of the givenItemStack
reaches its maximum stack size.int
Inventory.collectSimilar
(@Nullable UpdateReason updateReason, @NotNull org.bukkit.inventory.ItemStack template, int baseAmount) Finds allItemStack
s similar to the providedItemStack
and removes them from their slot until the maximum stack size of theMaterial
is reached.boolean
Inventory.forceSetItem
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack itemStack) Changes theItemStack
on a specific slot to that one, regardless of what was previously on that slot.boolean
Inventory.modifyItem
(@Nullable UpdateReason updateReason, int slot, @NotNull Consumer<@Nullable org.bukkit.inventory.ItemStack> modifier) Changes theItemStack
on a specific slot based on the currentItemStack
on that slot, using a modifier consumer.int
Inventory.putItem
(@Nullable UpdateReason updateReason, int slot, @NotNull org.bukkit.inventory.ItemStack itemStack) Adds anItemStack
on a specific slot and returns the amount of items that did not fit on that slot.int
Inventory.removeFirst
(@Nullable UpdateReason updateReason, int amount, @NotNull Predicate<@NotNull org.bukkit.inventory.ItemStack> predicate) Removes the first nItemStacks
matching the givenPredicate
.int
Inventory.removeFirstSimilar
(@Nullable UpdateReason updateReason, int amount, @NotNull org.bukkit.inventory.ItemStack itemStack) Removes the first nItemStacks
that are similar to the specifiedItemStack
.int
Inventory.removeIf
(@Nullable UpdateReason updateReason, @NotNull Predicate<@NotNull org.bukkit.inventory.ItemStack> predicate) Removes allItemStacks
matching the givenPredicate
.int
Inventory.removeSimilar
(@Nullable UpdateReason updateReason, @NotNull org.bukkit.inventory.ItemStack itemStack) Removes allItemStacks
that are similar to the specifiedItemStack
.boolean
Inventory.replaceItem
(@Nullable UpdateReason updateReason, int slot, @NotNull Function<@Nullable org.bukkit.inventory.ItemStack, @Nullable org.bukkit.inventory.ItemStack> function) Replaces theItemStack
on a specific slot based on the currentItemStack
on that slot, using a replace function.boolean
Inventory.setItem
(@Nullable UpdateReason updateReason, int slot, @Nullable org.bukkit.inventory.ItemStack itemStack) Changes theItemStack
on a specific slot to the given one, regardless of what previously was on that slot.int
Inventory.setItemAmount
(@Nullable UpdateReason updateReason, int slot, int amount) Sets the amount of anItemStack
on a slot to the given value while respecting the max allowed stack size on that slot. -
Uses of UpdateReason in xyz.xenondevs.invui.inventory.event
Modifier and TypeFieldDescriptionstatic final UpdateReason
UpdateReason.SUPPRESSED
AnUpdateReason
that suppresses all event calls.ModifierConstructorDescriptionItemPostUpdateEvent
(@NotNull Inventory inventory, int slot, @Nullable UpdateReason updateReason, @Nullable org.bukkit.inventory.ItemStack previousItem, @Nullable org.bukkit.inventory.ItemStack newItem) Creates a newItemPreUpdateEvent
.ItemPreUpdateEvent
(@NotNull Inventory inventory, int slot, @Nullable UpdateReason updateReason, @Nullable org.bukkit.inventory.ItemStack previousItem, @Nullable org.bukkit.inventory.ItemStack newItem) Creates a newItemPreUpdateEvent
.