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
ConstructorDescriptionStockOverflowEvent
(@NotNull StockHolder stockHolder, @NotNull BoxItem item, int increments, int excess, @NotNull StockEvent.Cause cause) The constructor ofStockOverflowEvent
. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the amount exceedingInteger.MAX_VALUE
.@NotNull String
Creates the debug log from this event.toString()
Methods inherited from class net.okocraft.box.api.event.stockholder.stock.StockIncreaseEvent
getIncrements
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
-
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
- theStockHolder
of this eventitem
- the item that has overflowed the amount of stockincrements
- the amount of increased (excess is not included)excess
- the amount exceedingInteger.MAX_VALUE
cause
- 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:BoxEvent
Creates the debug log from this event.- Overrides:
toDebugLog
in classStockIncreaseEvent
- Returns:
- the debug log
-
toString
- Overrides:
toString
in classStockIncreaseEvent
-