Package ovh.mythmc.banco.api.bukkit.util
Class ItemUtil
java.lang.Object
ovh.mythmc.banco.api.bukkit.util.ItemUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<org.bukkit.inventory.ItemStack> convertAmountToItems
(BigDecimal amount) Gets a list of ItemStack valued at a specified amountstatic BancoItem
getBancoItem
(@NotNull org.bukkit.inventory.ItemStack item) Gets a BancoItem matching an ItemStack's parametersstatic org.bukkit.inventory.ItemStack
getItemStack
(@NotNull BancoItem bancoItem, int amount) Gets an ItemStack matching BancoItem's parametersstatic boolean
isBancoItem
(org.bukkit.inventory.ItemStack item) Checks whether an ItemStack is a valid BancoItem or not
-
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 fromamount
- amount of items- Returns:
- An ItemStack matching BancoItem's parameters
-
getBancoItem
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
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
-