TradeScreen

open class TradeScreen

Utilities for interacting with the "trading" interface that appears for player-to-player trades.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
open class MyPlayer
My player's trade screen information
Link copied to clipboard
open class OtherPlayer
The other player's trade screen information
Link copied to clipboard
enum Stage
The trade window stage

Functions

Link copied to clipboard
open fun accept(): Boolean
Clicks the accept button on either the first or second trade window, and will wait for the trade interface to change.
Link copied to clipboard
open fun close(): Boolean
Closes the trading window, and waits for the window to close.
Link copied to clipboard
Gets the stage of the current trade.
Link copied to clipboard
open fun isDelayed(): Boolean
Checks accepting is delayed because something was changed recently in the trade
Link copied to clipboard
open fun offer(itemId: Int, amount: Int): Boolean
Offers the items whose ID matches the specified ID to the first trade window.
Link copied to clipboard
open fun offerAll(itemId: Int): Boolean
Offers the items whose ID matches the specified ID to the first trade window.
Link copied to clipboard
open fun remove(itemId: Int, amount: Int): Boolean
Removes the offered items whose ID matches the specified ID to the first trade window.
Link copied to clipboard
open fun removeAll(itemId: Int): Boolean
Removes the items whose ID matches the specified ID to the first trade window.