Class StockDecreaseEvent
java.lang.Object
net.okocraft.box.api.event.BoxEvent
net.okocraft.box.api.event.stockholder.StockHolderEvent
net.okocraft.box.api.event.stockholder.stock.StockEvent
net.okocraft.box.api.event.stockholder.stock.StockDecreaseEvent
A
StockEvent called when the stock is decreased.-
Nested Class Summary
Nested classes/interfaces inherited from class net.okocraft.box.api.event.stockholder.stock.StockEvent
StockEvent.Cause -
Constructor Summary
ConstructorsConstructorDescriptionStockDecreaseEvent(@NotNull StockHolder stockHolder, @NotNull BoxItem item, int decrements, int currentAmount, @NotNull StockEvent.Cause cause) The constructor ofStockDecreaseEvent. -
Method Summary
Methods inherited from class net.okocraft.box.api.event.stockholder.stock.StockEvent
getAmount, getCause, getItemMethods inherited from class net.okocraft.box.api.event.stockholder.StockHolderEvent
getStockHolder
-
Constructor Details
-
StockDecreaseEvent
public StockDecreaseEvent(@NotNull @NotNull StockHolder stockHolder, @NotNull @NotNull BoxItem item, int decrements, int currentAmount, @NotNull @NotNull StockEvent.Cause cause) The constructor ofStockDecreaseEvent.- Parameters:
stockHolder- the stockholder of the eventitem- the item of the stockdecrements- the amount of decreasedcurrentAmount- the current amount of the stockcause- 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
Description copied from class:BoxEventCreates the debug log from this event.- Overrides:
toDebugLogin classStockHolderEvent- Returns:
- the debug log
-
toString
- Overrides:
toStringin classStockHolderEvent
-