Class StockOverflowEvent
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
net.okocraft.box.api.event.stockholder.stock.StockOverflowEvent
A
StockEvent called when the amount of stock exceeds Integer.MAX_VALUE.-
Nested Class Summary
Nested classes/interfaces inherited from class net.okocraft.box.api.event.stockholder.stock.StockEvent
StockEvent.Cause -
Constructor Summary
ConstructorsConstructorDescriptionStockOverflowEvent(@NotNull StockHolder stockHolder, @NotNull BoxItem item, int increments, int excess, @NotNull StockEvent.Cause cause) The constructor ofStockOverflowEvent. -
Method Summary
Modifier and TypeMethodDescriptionintGets the amount exceedingInteger.MAX_VALUE.@NotNull StringCreates the debug log from this event.toString()Methods inherited from class net.okocraft.box.api.event.stockholder.stock.StockIncreaseEvent
getIncrementsMethods 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
-
StockOverflowEvent
public StockOverflowEvent(@NotNull @NotNull StockHolder stockHolder, @NotNull @NotNull BoxItem item, int increments, int excess, @NotNull @NotNull StockEvent.Cause cause) The constructor ofStockOverflowEvent.- Parameters:
stockHolder- theStockHolderof this eventitem- the item that has overflowed the amount of stockincrements- the amount of increased (excess is not included)excess- the amount exceedingInteger.MAX_VALUEcause- the cause that indicates why this event was called
-
-
Method Details
-
getExcess
public int getExcess()Gets the amount exceedingInteger.MAX_VALUE.- Returns:
- the amount exceeding
Integer.MAX_VALUE
-
toDebugLog
Description copied from class:BoxEventCreates the debug log from this event.- Overrides:
toDebugLogin classStockIncreaseEvent- Returns:
- the debug log
-
toString
- Overrides:
toStringin classStockIncreaseEvent
-