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
ConstructorDescriptionStockDecreaseEvent
(@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, getItem
Methods 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:BoxEvent
Creates the debug log from this event.- Overrides:
toDebugLog
in classStockHolderEvent
- Returns:
- the debug log
-
toString
- Overrides:
toString
in classStockHolderEvent
-