Class StockMarketService
java.lang.Object
org.rspeer.game.service.stockmarket.StockMarketService
- All Implemented Interfaces:
org.rspeer.event.Service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidnotify(StockMarketEvent event) voidvoidsetCancelConsumer(BiConsumer<StockMarketEntry, Integer> cancelConsumer) voidsubmit(StockMarketable.Type type, ItemEntry entry) voidsubmit(StockMarketable.Type type, StockMarketEntry entry) Submits an offer to buy or sell.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rspeer.event.Service
onSubscribe
-
Constructor Details
-
StockMarketService
public StockMarketService()
-
-
Method Details
-
submit
Submits an offer to buy or sell. Doing so will enable isAttentionRequired and thus should trigger restock tasks. -
submit
-
isWaiting
public boolean isWaiting()- Returns:
- true if offers are in progress
-
getWaiting
-
getCancel
-
getSelling
-
getBuying
-
isAttentionRequired
public boolean isAttentionRequired()- Returns:
- true if the player has tasks to do at the g/e
-
getNextBuyOffer
-
getNextSellOffer
-
notify
-
onUnsubscribe
public void onUnsubscribe()- Specified by:
onUnsubscribein interfaceorg.rspeer.event.Service
-
getCancelConsumer
-
setCancelConsumer
-