Class ItemUtils

java.lang.Object
org.geysermc.geyser.util.ItemUtils

public class ItemUtils extends Object
  • Constructor Details

    • ItemUtils

      public ItemUtils()
  • Method Details

    • getEnchantmentLevel

      public static int getEnchantmentLevel(@Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components, Enchantment.JavaEnchantment enchantment)
    • getCorrectBedrockDurability

      public static int getCorrectBedrockDurability(Item item, int original)
      Returns:
      the correct Bedrock durability for this item.
    • getCustomName

      public static @Nullable net.kyori.adventure.text.Component getCustomName(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components)
      Parameters:
      components - the data components of the item
      Returns:
      the custom name of the item