Package com.nexomc.nexo.utils
Object ItemUtils
-
- All Implemented Interfaces:
public class ItemUtils
-
-
Method Summary
Modifier and Type Method Description final BooleanisAllowedInVanillaRecipes(ItemStack itemStack)final UniteditPersistentDataContainer(ItemStack itemStack, Function1<PersistentDataContainer, Unit> action)final List<ItemStack>itemStacks(Material materials)final UnittriggerCooldown(Player player, ItemStack item)final static UnitdamageItem(Player player, ItemStack itemStack)Used to correctly damage the item in the player's hand based on broken block Only handles it if the block is a NexoBlock or NexoFurniture final static BooleanisTool(ItemStack itemStack)final BooleanisTool(Material material)final static ItemStackusingConvertsTo(ItemMeta itemMeta)final static UnitusingConvertsTo(FoodComponent foodComponent, ItemStack replacement)-
-
Method Detail
-
isAllowedInVanillaRecipes
final Boolean isAllowedInVanillaRecipes(ItemStack itemStack)
-
editPersistentDataContainer
final Unit editPersistentDataContainer(ItemStack itemStack, Function1<PersistentDataContainer, Unit> action)
-
itemStacks
final List<ItemStack> itemStacks(Material materials)
-
triggerCooldown
final Unit triggerCooldown(Player player, ItemStack item)
-
damageItem
final static Unit damageItem(Player player, ItemStack itemStack)
Used to correctly damage the item in the player's hand based on broken block Only handles it if the block is a NexoBlock or NexoFurniture
- Parameters:
player- the player that broke the NexoBlock or NexoFurnitureitemStack- the item in the player's hand
-
usingConvertsTo
final static ItemStack usingConvertsTo(ItemMeta itemMeta)
-
usingConvertsTo
final static Unit usingConvertsTo(FoodComponent foodComponent, ItemStack replacement)
-
-
-
-