Class AsyncMarketRestockEvent
java.lang.Object
org.bukkit.event.Event
us.teaminceptus.novaconomy.api.events.market.MarketEvent
us.teaminceptus.novaconomy.api.events.market.AsyncMarketRestockEvent
- All Implemented Interfaces:
Cancellable
Called before the market is restocked. Normally called Asyncronously.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetches how much stock there will be after the restock.longgetNewStock(@NotNull Material m) Fetches how much stock there will be after the restock.Fetches how much stock there was before the restock.longgetOldStock(@NotNull Material m) Fetches how much stock there was before the restock.booleanvoidsetCancelled(boolean cancel) voidsetNewStock(@NotNull Map<Material, Long> newStock) Sets how much stock there will be after the restock.voidsetNewStock(Material m, long newStock) Sets how much stock there will be after the restock.Methods inherited from class us.teaminceptus.novaconomy.api.events.market.MarketEvent
getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
Method Details
-
getOldStock
Fetches how much stock there was before the restock.- Returns:
- Map of Old Stock Material to Amount
-
getOldStock
Fetches how much stock there was before the restock.- Parameters:
m- Material to fetch- Returns:
- Old Stock Amount
-
getNewStock
Fetches how much stock there will be after the restock.- Returns:
- Map of New Stock Material to Amount
-
getNewStock
Fetches how much stock there will be after the restock.- Parameters:
m- Material to fetch- Returns:
- New Stock Amount
-
setNewStock
Sets how much stock there will be after the restock.- Parameters:
m- Material to setnewStock- New Stock Amount
-
setNewStock
Sets how much stock there will be after the restock.- Parameters:
newStock- New Stock Map
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceCancellable
-