Skip to content

Scoreboards Lines

fren_gor edited this page Dec 4, 2020 · 7 revisions

Index:


Lines

In scoreboard configs, lines can be declared directly under scoreboard-lines or under lines.

scoreboard-lines:
  - "&cDirectly declared line"
  - textline

lines:
  textline:
    type: TEXT
    text: "&eThis &6is &5a &cline"
    placeholders: false

Directly declared lines support only color codes, no placeholders or animations. To add them, lines must be declared under the lines section of the config as in the example above. Every line has a type, which can be set to TEXT, SLIDING, or STEP. Also, every type require its own fields. See down below for the explanation of every type.

Text lines

Text lines contain just a line of text. They support colors and placeholders.

Specific-Line Fields:

Field Default Value Explanation
text "" (Empty line) The text to be displayed.
update-frequency 1 How many scoreboard updates should the line update.
placeholders false true if text contains placeholders, false otherwise.

Example:

lines:
  textline1:
    type: TEXT
    text: "&eThis is a line"
  textline2:
    type: TEXT
    text: "&eYou are %player_name%"
    placeholders: true
  textline3:
    type: TEXT
    text: "&aYour ping is %player_ping%"
    update-frequency: 10 # Player ping updates every 10 scoreboard updates
    placeholders: true

Sliding lines

Sliding lines are the best for animations. They make letters appearing from the left, until the text is fully shown.

Specific-Line Fields:

Field Default Value Explanation
text "" (Empty line) The text to be displayed.
skip-blanks true true if blanks (spaces) should appear together with the next letter to show (like they are "skipped"), false otherwise.
reverse false true if the letters should appear from the right, false otherwise.
update-frequency 1 How many scoreboard updates should the line update.
placeholders false true if text contains placeholders, false otherwise.

Example:

lines:
  slidingline1:
    type: SLIDING
    text: "&eJust sliding!"
    skip-blanks: true
    reverse: false
    update-frequency: 1
    placeholders: false

Step lines

Step lines show a different line of text every update. Those lines are taken from the list of lines defined in the steps field. They are shown sequentially (one after the other) from the top downwards.

Specific-Line Fields:

Field Default Value Explanation
steps [] (Empty list) A list of lines to be shown.
update-frequency 1 How many scoreboard updates should the line update.
placeholders false true if text contains placeholders, false otherwise.

Example:

lines:
  slidingline1:
    type: SLIDING
    steps:
      - "&eStep 1"
      - "&6Line 2"
      - "&eLine 3"
      - "&6Line 4"
      - "&eLine 5"
      - "&6Line 6"
    update-frequency: 1
    placeholders: false
Clone this wiki locally