Class StockIncreaseEvent
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.StockIncreaseEvent
- Direct Known Subclasses:
StockOverflowEvent
A
StockEvent
called when the stock is increased.-
Nested Class Summary
Nested classes/interfaces inherited from class net.okocraft.box.api.event.stockholder.stock.StockEvent
StockEvent.Cause
-
Constructor Summary
ConstructorDescriptionStockIncreaseEvent
(@NotNull StockHolder stockHolder, @NotNull BoxItem item, int increments, int currentAmount, @NotNull StockEvent.Cause cause) The constructor ofStockIncreaseEvent
. -
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
-
StockIncreaseEvent
public StockIncreaseEvent(@NotNull @NotNull StockHolder stockHolder, @NotNull @NotNull BoxItem item, int increments, int currentAmount, @NotNull @NotNull StockEvent.Cause cause) The constructor ofStockIncreaseEvent
.- Parameters:
stockHolder
- the stockholder of the eventitem
- the item of the stockincrements
- the amount of increasedcurrentAmount
- the current amount of the stockcause
- the cause that indicates why this event was called
-
-
Method Details
-
getIncrements
public int getIncrements()Gets the amount of increased.- Returns:
- the amount of increased
-
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
-