addObjective

abstract fun addObjective(name: String, criterion: Criterion, displayName: Component, renderType: ObjectiveRenderType): Objective

Creates a new objective with the given name, criterion, displayName, and renderType, and adds it to this scoreboard.

Return

the created objective

Parameters

name

the name

criterion

the criterion

displayName

the display name

renderType

the render type

Throws

if an objective with the given name is already registered with this scoreboard