getName

fun getName(itemStack: ItemStack): Component

Gets the actually displayed name of the given itemStack. If the itemStack has a custom display name, that will be returned. Otherwise, the localized name will be returned.