Package studio.magemonkey.genesis.misc
Class CurrencyTools
java.lang.Object
studio.magemonkey.genesis.misc.CurrencyTools
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDisplayPrice(CurrencyTools.GenesisCurrency currency, double price) Get the display price for somethingstatic voidgiveReward(org.bukkit.entity.Player p, CurrencyTools.GenesisCurrency currency, double reward) Give a currency reward to a playerstatic booleanhasValue(org.bukkit.entity.Player p, CurrencyTools.GenesisCurrency currency, double value, boolean failMessage) Check if a player has enough of a specific currencystatic StringtakePrice(org.bukkit.entity.Player p, CurrencyTools.GenesisCurrency currency, double cost) Take currency from a player
-
Constructor Details
-
CurrencyTools
public CurrencyTools()
-
-
Method Details
-
hasValue
public static boolean hasValue(org.bukkit.entity.Player p, CurrencyTools.GenesisCurrency currency, double value, boolean failMessage) Check if a player has enough of a specific currency- Parameters:
p- the player to checkcurrency- the currency to checkvalue- the amount to look forfailMessage- send fail message or not- Returns:
- has enough or not
-
takePrice
public static String takePrice(org.bukkit.entity.Player p, CurrencyTools.GenesisCurrency currency, double cost) Take currency from a player- Parameters:
p- player to modifycurrency- the currency to takecost- the amount to take- Returns:
- the price to take from user
-
giveReward
public static void giveReward(org.bukkit.entity.Player p, CurrencyTools.GenesisCurrency currency, double reward) Give a currency reward to a player- Parameters:
p- the player to modifycurrency- the currency to givereward- the amount to give
-
getDisplayPrice
Get the display price for something- Parameters:
currency- the currency to getprice- the price to check- Returns:
- display price
-