Interface BedWars.ShopUtil

Enclosing interface:
BedWars

public static interface BedWars.ShopUtil
The ShopUtil interface provides utility methods for managing player's money, currency, and purchases in the shop.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    calculateMoney(org.bukkit.entity.Player player, org.bukkit.Material currency)
    Retrieves the amount of money a player has in the specified currency.
    org.bukkit.Material
    getCurrency(String currency)
    Retrieves the currency material based on its name.
    org.bukkit.ChatColor
    getCurrencyColor(org.bukkit.Material currency)
    Retrieves the color associated with the specified currency material.
    Retrieves the currency message path for the specified content tier.
    Retrieves the player quick buy cache instance.
    Retrieves the Roman numeral representation of the specified integer.
    Retrieves the shop cache instance.
    Retrieves the shop manager instance.
    void
    takeMoney(org.bukkit.entity.Player player, org.bukkit.Material currency, int amount)
    Takes the specified amount of money from the player in the specified currency.
  • Method Details

    • calculateMoney

      int calculateMoney(org.bukkit.entity.Player player, org.bukkit.Material currency)
      Retrieves the amount of money a player has in the specified currency.
      Parameters:
      player - the player
      currency - the currency material
      Returns:
      the amount of money the player has
    • getCurrency

      org.bukkit.Material getCurrency(String currency)
      Retrieves the currency material based on its name.
      Parameters:
      currency - the currency name
      Returns:
      the currency material, or Material.AIR if it is a vault currency
    • getCurrencyColor

      org.bukkit.ChatColor getCurrencyColor(org.bukkit.Material currency)
      Retrieves the color associated with the specified currency material.
      Parameters:
      currency - the currency material
      Returns:
      the color associated with the currency
    • getCurrencyMsgPath

      String getCurrencyMsgPath(IContentTier contentTier)
      Retrieves the currency message path for the specified content tier.
      Parameters:
      contentTier - the content tier
      Returns:
      the currency message path
    • getRomanNumber

      String getRomanNumber(int n)
      Retrieves the Roman numeral representation of the specified integer.
      Parameters:
      n - the integer value (1-10)
      Returns:
      the Roman numeral representation
    • takeMoney

      void takeMoney(org.bukkit.entity.Player player, org.bukkit.Material currency, int amount)
      Takes the specified amount of money from the player in the specified currency.
      Parameters:
      player - the player
      currency - the currency material
      amount - the amount of money to take
    • getShopManager

      IShopManager getShopManager()
      Retrieves the shop manager instance.
      Returns:
      the shop manager
    • getShopCache

      IShopCache getShopCache()
      Retrieves the shop cache instance.
      Returns:
      the shop cache
    • getPlayerQuickBuyCache

      IPlayerQuickBuyCache getPlayerQuickBuyCache()
      Retrieves the player quick buy cache instance.
      Returns:
      the player quick buy cache