displayIf

fun displayIf(displayName: String, condition: Boolean = false): ItemBuilder(source)

Change the displayname of the item if a certain condition is true.

Return

An instance of the ItemBuilder with the updated displayname, or the original instance if the condition is false.

Parameters

displayName

The new displayname (could be rgb).

condition

Boolean value indicating if the displayname should be changed.