Class StockDecreaseEvent


public class StockDecreaseEvent extends StockEvent
A StockEvent called when the stock is decreased.
  • Constructor Details

    • StockDecreaseEvent

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

    • getDecrements

      public int getDecrements()
      Gets the amount of decreased.
      Returns:
      the amount of decreased
    • 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