public class SimpleShop extends SimpleItemQuery<SimpleItem>
Modifier and Type | Class and Description |
---|---|
static class |
SimpleShop.Amount
An enum of the Amounts you can click in the shop
|
Constructor and Description |
---|
SimpleShop(ClientContext ctx) |
Modifier and Type | Method and Description |
---|---|
boolean |
buy(int id,
SimpleShop.Amount amount)
returns if the specified item by name={name} has been purchased in amount={Amount}
|
boolean |
buy(java.lang.String name,
SimpleShop.Amount amount)
returns if the specified item by name={name} has been purchased in amount={Amount}
|
boolean |
closeShop()
will close the shop widget if the shop is open, {true} if it's been closed, {false} otherwise
|
java.lang.String |
name()
returns the name of the open shop
|
boolean |
sell(int id,
SimpleShop.Amount amount)
returns if the specified item by id={id} has been sold in amount={Amount}
|
boolean |
sell(java.lang.String name,
SimpleShop.Amount amount)
returns if the specified item by name={name} has been sold in amount={Amount}
|
boolean |
shopOpen()
returns {true} if a shop is open, {false} otherwise
|
filter, filter, filter, filterHasAction, filterHasAction, population
contains, filter, isEmpty, iterator, next, peekNext, populate, population, reverse, shuffle, size, sort, toStream
public SimpleShop(ClientContext ctx)
public java.lang.String name()
public boolean shopOpen()
public boolean closeShop()
public boolean buy(java.lang.String name, SimpleShop.Amount amount)
name
- amount
- public boolean buy(int id, SimpleShop.Amount amount)
id
- amount
- public boolean sell(java.lang.String name, SimpleShop.Amount amount)
name
- amount
- public boolean sell(int id, SimpleShop.Amount amount)
id
- amount
-