TradeScreen

public class TradeScreen

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

Types

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

Functions

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