| Package | Description |
|---|---|
| net.javachallenge.api | |
| net.javachallenge.api.command |
| Modifier and Type | Method and Description |
|---|---|
PlayerTrade |
Game.getDemand(int playerId,
Material material)
Returns the existing demand with the specified material from the specified player or, null if
no offer.
|
PlayerTrade |
Game.getOffer(int playerId,
Material material)
Returns the existing offer with the specified material from the specified player or, null if no
offer.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<PlayerTrade> |
Game.getDemands(int playerId)
Returns the existing demand list with the specified player as a copied mutable list.
|
java.util.ArrayList<PlayerTrade> |
Game.getDemands(Material material)
Returns the existing demand list with the specified material as a copied mutable list.
|
java.util.ArrayList<PlayerTrade> |
Game.getOffers(int playerId)
Returns the existing offer list with the specified player as a copied mutable list.
|
java.util.ArrayList<PlayerTrade> |
Game.getOffers(Material material)
Returns the existing offer list with the specified material as a copied mutable list.
|
java.util.ArrayList<PlayerTrade> |
Game.getPlayerTrades()
Returns the existing trades (offers and demands) as a copied mutable list.
|
| Modifier and Type | Method and Description |
|---|---|
static Command |
Commands.buyFromPlayerTrade(PlayerTrade trade,
int amount)
Constructs a command to buy the given material from another player.
|
static Command |
Commands.sellToPlayerTrade(PlayerTrade trade,
int amount)
Constructs a command to make an offer to other players.
|