Skip to main content

Score

Overview

Substitutes the Scoreboard-value of a given objective for a provided score-holder; this tag acts as a placeholder and must thereby be self-closing (does not accept content).

<score

  namestring

  ↪ Name of the score-holder (player-name)

  objectivestring

  ↪ Name of the target-objective

  typestring(null)

  ↪ Additional objective-parameter if required

  ↪ e.g. sand for objective mine_block

  overridestring(null)

  ↪ Value to use as an override

  fallbackstring(null)

  ↪ Value to use as a fallback

  renderermarkup(null)

  ↪ Custom renderer to display a value

  ↪ Introduces the {score_value} placeholder

/>

Examples

Plain Value

In order to retrieve a score-value as-is, there's no need to specify a custom renderer.

info

By default, the scoreboard does not track any of the existing vanilla criteria, thus they need to be added manually by invoking: Code-Blocks are only available within the browser. For this web-renderer, we randomly generate them.

Code-Blocks are only available within the browser

Modified Value

With the renderer, score-values may be modified as desired; let's transform the count of half-hearts that Code-Blocks are only available within the browser shows a fractional number.

Code-Blocks are only available within the browser

Typed Value

Some objectives require a type, like when one wants to resolve how many blocks of a specific material have been mined by a player.

Code-Blocks are only available within the browser