Class StickContainerChangeEvent

java.lang.Object
net.okocraft.box.api.event.BoxEvent
net.okocraft.box.feature.stick.event.StickContainerChangeEvent

@NotNullByDefault public final class StickContainerChangeEvent extends BoxEvent
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 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 Stick
      location - the clicked block of the container
      before - the container's slot contents before the operation
      after - the container's slot contents after the operation
  • Method Details

    • getActor

      public StockActor.Player getActor()
    • getLocation

      public Location getLocation()
      Returns a copy of the location of the clicked block.
    • getBefore

      @Nullable public @Nullable ItemStack[] getBefore()
      Returns an independent copy of the contents before the operation, in slot order.
    • getAfter

      @Nullable public @Nullable ItemStack[] getAfter()
      Returns an independent copy of the contents after the operation, in slot order.