getOrCreateObjective

fun getOrCreateObjective(name: String, displayName: Component = Component.literal(name), criteria: ObjectiveCriteria = ObjectiveCriteria.DUMMY, renderType: ObjectiveCriteria.RenderType = ObjectiveCriteria.RenderType.INTEGER, displayAutoUpdate: Boolean = false, numberFormat: NumberFormat? = null): Objective

Get or create a scoreboard Objective.

Return

existing or newly created Objective

Parameters

name

objective name

displayName

display name component for the objective

criteria

objective criteria

renderType

render type for the objective

displayAutoUpdate

whether the display auto-updates

numberFormat

optional number format