Class StockSetEvent


public class StockSetEvent extends StockEvent
A StockEvent called when the amount of the stock is set.
  • Constructor Details

    • StockSetEvent

      public StockSetEvent(@NotNull @NotNull StockHolder stockHolder, @NotNull @NotNull BoxItem item, int amount, int previousAmount, @NotNull @NotNull StockEvent.Cause cause)
      The constructor of StockSetEvent.
      Parameters:
      stockHolder - the stockholder of the event
      item - the item of the stock
      amount - the current amount of the stock
      previousAmount - the amount of stock before set
      cause - the cause that indicates why this event was called
  • Method Details

    • getPreviousAmount

      public int getPreviousAmount()
      Gets the amount of stock before set.
      Returns:
      the amount of stock before set
    • toDebugLog

      @NotNull public @NotNull String toDebugLog()
      Description copied from class: BoxEvent
      Creates the debug log from this event.
      Overrides:
      toDebugLog in class StockHolderEvent
      Returns:
      the debug log
    • toString

      public String toString()
      Overrides:
      toString in class StockHolderEvent