Class StickContainerChangeEvent
java.lang.Object
net.okocraft.box.api.event.BoxEvent
net.okocraft.box.feature.stick.event.StickContainerChangeEvent
A notification fired on the thread handling a Box Stick operation after a physical container's
contents have changed. Pure slot moves and changes in how stacks are split do not fire this event.
-
Constructor Summary
ConstructorsConstructorDescriptionStickContainerChangeEvent(StockActor.Player actor, Location location, @Nullable ItemStack[] before, @Nullable ItemStack[] after) -
Method Summary
Modifier and TypeMethodDescriptiongetActor()@Nullable ItemStack[]getAfter()Returns an independent copy of the contents after the operation, in slot order.@Nullable ItemStack[]Returns an independent copy of the contents before the operation, in slot order.Returns a copy of the location of the clicked block.Methods inherited from class BoxEvent
toDebugLog
-
Constructor Details
-
StickContainerChangeEvent
public StickContainerChangeEvent(StockActor.Player actor, Location location, @Nullable @Nullable ItemStack[] before, @Nullable @Nullable ItemStack[] after) - Parameters:
actor- the player who used the Box Sticklocation- the clicked block of the containerbefore- the container's slot contents before the operationafter- the container's slot contents after the operation
-
-
Method Details
-
getActor
-
getLocation
Returns a copy of the location of the clicked block. -
getBefore
Returns an independent copy of the contents before the operation, in slot order. -
getAfter
Returns an independent copy of the contents after the operation, in slot order.
-