Class StockSetEvent
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.StockSetEvent
A
StockEvent called when the amount of the stock is set.-
Nested Class Summary
Nested classes/interfaces inherited from class net.okocraft.box.api.event.stockholder.stock.StockEvent
StockEvent.Cause -
Constructor Summary
ConstructorsConstructorDescriptionStockSetEvent(@NotNull StockHolder stockHolder, @NotNull BoxItem item, int amount, int previousAmount, @NotNull StockEvent.Cause cause) The constructor ofStockSetEvent. -
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
-
StockSetEvent
public StockSetEvent(@NotNull @NotNull StockHolder stockHolder, @NotNull @NotNull BoxItem item, int amount, int previousAmount, @NotNull @NotNull StockEvent.Cause cause) The constructor ofStockSetEvent.- Parameters:
stockHolder- the stockholder of the eventitem- the item of the stockamount- the current amount of the stockpreviousAmount- the amount of stock before setcause- 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
Description copied from class:BoxEventCreates the debug log from this event.- Overrides:
toDebugLogin classStockHolderEvent- Returns:
- the debug log
-
toString
- Overrides:
toStringin classStockHolderEvent
-