Bazaar

object Bazaar(source)

Singleton object for managing bazaar operations

Types

Link copied to clipboard
class BazaarError(currentQuery: Bazaar.Query, parent: Throwable?, orMessage: String? = null) : MacrocosmThrowable

An error that occurs when processing bazaar operation

Link copied to clipboard

Demands all items of type element from player

Link copied to clipboard

Demands coins amount of coins from the player.

Link copied to clipboard
class DemandQtyItemsQuery(val element: Identifier, val amount: Int) : Bazaar.Query

Demands a certain quantity of items of type element from player

Link copied to clipboard
interface Query

An interface for bazaar queries

Functions

Link copied to clipboard
fun createBuyOrder(player: MacrocosmPlayer, paper: Player, item: Identifier, amount: Int, pricePer: Double)

Creates a buy order as the provided player

Link copied to clipboard
fun createSellOrder(player: MacrocosmPlayer, paper: Player, item: Identifier, amount: Int, pricePer: Double)

Creates a sell order as the provided player

Link copied to clipboard

Gets all orders for the provided player

Link copied to clipboard
fun init()

Initializes the bazaar

Link copied to clipboard
fun instantBuy(player: MacrocosmPlayer, paper: Player, item: Identifier, qty: Int)

Instantly buys provided items

Link copied to clipboard
fun instantSell(player: MacrocosmPlayer, paper: Player, item: Identifier, qty: Int)

Instantly sells provided items

Link copied to clipboard
fun tryDoInstantBuy(player: MacrocosmPlayer, element: Identifier, amount: Int, mutate: Boolean = true): CompletableFuture<InstantBuyResult>

Attempts to instantly buy provided items

Link copied to clipboard

Attempts to instantly sell provided items

Properties

Link copied to clipboard
lateinit var table: BazaarTable

The containing table for bazaar operations