java.lang.Object
net.guizhanss.guizhanlib.minecraft.helper.inventory.ItemStackHelper

public final class ItemStackHelper extends Object
物品(ItemStack)
Author:
ybw0014
  • Constructor Details

    • ItemStackHelper

      public ItemStackHelper()
  • Method Details

    • getDisplayName

      @Nonnull public static String getDisplayName(@Nonnull ItemStack item)
      返回物品(ItemStack)的显示名称, 如果无显示名称则返回中文名称
      Parameters:
      item - ItemStack 物品
      Returns:
      物品的显示名称
    • getName

      @Nonnull public static String getName(@Nonnull ItemStack item)
      返回物品(ItemStack)的中文名称
      Parameters:
      item - ItemStack 物品
      Returns:
      物品的中文名称,如果获取失败则返回对应的键名