Object ItemUtils

  • All Implemented Interfaces:

    
    public class ItemUtils
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit editPersistentDataContainer(ItemStack itemStack, Function1<PersistentDataContainer, Unit> action)
      final List<ItemStack> itemStacks(Material materials)
      final Unit triggerCooldown(Player player, ItemStack item)
      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
      final static Boolean isTool(ItemStack itemStack)
      final Boolean isTool(Material material)
      final static Boolean isMusicDisc(ItemStack itemStack)
      final static ItemStack getUsingConvertsTo(ItemMeta itemMeta)
      final static Unit setUsingConvertsTo(FoodComponent foodComponent, ItemStack replacement)
      final PersistentDataContainer getPersistentDataView(ItemStack $self)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • 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 NexoFurniture
        itemStack - the item in the player's hand
      • setUsingConvertsTo

         final static Unit setUsingConvertsTo(FoodComponent foodComponent, ItemStack replacement)