setAllCandidateNotDisplayableItem

fun setAllCandidateNotDisplayableItem(item: ItemStack, loreSupplier: (String) -> List<Component>?)

Set an item that is used for an all-candidates-menu's not displayable items slot. If the specified items material is not Material#isItem, this throws Errors.

loreSupplier must receive a recipe-name and return a lore-list.

A default loreSupplier is

// This is a very simple lore supplier.
val supplier: (String) -> List<Component>? = { recipeName ->
listOf(MiniMessage.miniMessage().deserialize("<white>Recipe Name: $recipeName"))
}

If this receives "Janssons frestelse", returns a white character component is "Recipe Name: Janssons frestelse".

And also, you can set null to this. If you did, an all-candidates-menu's not displayable item does not show lore.

Since

5.0.9

Parameters

item

an item

loreSupplier

a lore supplier

Throws

If the provided items material is not Material#isItem, thrown.