Package org.geysermc.geyser.util
Class ItemUtils
java.lang.Object
org.geysermc.geyser.util.ItemUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetCorrectBedrockDurability(Item item, int original) static @Nullable net.kyori.adventure.text.ComponentgetCustomName(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components) static intgetEnchantmentLevel(@Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components, Enchantment.JavaEnchantment enchantment)
-
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
- 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
-