Class ItemUtil

java.lang.Object
ovh.mythmc.banco.api.bukkit.util.ItemUtil

public final class ItemUtil extends Object
  • Constructor Details

    • ItemUtil

      public ItemUtil()
  • Method Details

    • getItemStack

      public static org.bukkit.inventory.ItemStack getItemStack(@NotNull @NotNull BancoItem bancoItem, int amount)
      Gets an ItemStack matching BancoItem's parameters
      Parameters:
      bancoItem - BancoItem to get parameters from
      amount - amount of items
      Returns:
      An ItemStack matching BancoItem's parameters
    • getBancoItem

      public static BancoItem getBancoItem(@NotNull @NotNull org.bukkit.inventory.ItemStack item)
      Gets a BancoItem matching an ItemStack's parameters
      Parameters:
      item - an ItemStack to get parameters from
      Returns:
      a BancoItem matching item's parameters
    • isBancoItem

      public static boolean isBancoItem(org.bukkit.inventory.ItemStack item)
      Checks whether an ItemStack is a valid BancoItem or not
      Parameters:
      item - an ItemStack to get parameters from
      Returns:
      true if a BancoItem matching item's parameters exists
    • convertAmountToItems

      public static List<org.bukkit.inventory.ItemStack> convertAmountToItems(BigDecimal amount)
      Gets a list of ItemStack valued at a specified amount
      Parameters:
      amount - amount of money
      Returns:
      A list of ItemStack valued at a specified amount