Class CurrencyTools

java.lang.Object
studio.magemonkey.genesis.misc.CurrencyTools

public class CurrencyTools extends Object
  • 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 check
      currency - the currency to check
      value - the amount to look for
      failMessage - 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 modify
      currency - the currency to take
      cost - 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 modify
      currency - the currency to give
      reward - the amount to give
    • getDisplayPrice

      public static String getDisplayPrice(CurrencyTools.GenesisCurrency currency, double price)
      Get the display price for something
      Parameters:
      currency - the currency to get
      price - the price to check
      Returns:
      display price