| Constructor and Description |
|---|
Prices(java.util.List<java.lang.String> types,
java.lang.String cost)
Creates a new Prices instance, generates the price list
according to the input parameters
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getNotEnough(org.bukkit.entity.Player plr)
Returns an alphabetically ordered comma separated list of
balance types of which the given Player does not have enough
|
void |
give(org.bukkit.entity.Player plr)
Give all the prices to the given player
|
boolean |
has(org.bukkit.entity.Player plr)
Checks if the given player is able to pay all the prices,
this method should be used before using the take method
|
java.util.Iterator<Price> |
iterator()
Iterates through the prices
|
void |
take(org.bukkit.entity.Player plr)
Takes all the prices from the give Player
|
java.lang.String |
toString()
Returns a comma separated list of prices
|
public Prices(java.util.List<java.lang.String> types,
java.lang.String cost)
types - - The used balance typescost - - Space separated list of costspublic java.lang.String getNotEnough(org.bukkit.entity.Player plr)
plr - - Target Playerpublic void give(org.bukkit.entity.Player plr)
plr - public boolean has(org.bukkit.entity.Player plr)
plr - - Target Playerpublic java.util.Iterator<Price> iterator()
iterator in interface java.lang.Iterable<Price>public void take(org.bukkit.entity.Player plr)
plr - - Target Playerpublic java.lang.String toString()
toString in class java.lang.Object