Skip to content

Scoreboard Configuration

Scoreboards are separated by individual files located in the /scoreboards/ directory within the plugin directory. The name of the files is important as it represents the name of the scoreboard and is used to assign the scoreboard to a player depending on the assignment method configured in the main config.

Scoreboard lines

The most important aspect of the scoreboard is the scoreboard lines. The scoreboard can contain 15 lines and 1 title line (16 in total). Each line contains multiple frames that are looped to create an animation. The speed of this animation is indicated by the interval and can be set to randomize between the frames.

yaml
lines:
  myfirstline:
    frames:
      - 'Test'
      - 'Test1'
      - 'Test2'
    random: false
    interval: 1

In the YAML snippet above, I created a line called myfirstline. Since this is the first line in my scoreboard configuration, it will be treated as the title of my scoreboard. This line has multiple frames ("Test", "Test1", " Test2") that will be used to loop through. The interval in which it changes from frame to frame is 1 tick. By specifying that random: false, the frames are shown in order. Frames are looped through and switch every interval in ticks. This can be configured using the interval: 5 setting in a scoreboard line.

yaml
lines:
  - frames:
      - 'Test'
      - 'Test1'
      - 'Test2'
    random: false
    interval: 1
  - frames:
      - 'Test'
      - 'Test1'
      - 'Test2'
    random: false
    interval: 1
  - frames:
      - 'Test'
      - 'Test1'
      - 'Test2'
    random: false
    interval: 1

Alternatively, lines can be defined as a list of lines. This is useful if you want to create multiple lines without having to name each individual line. You can not mix named lines and list lines in the same configuration.

Scoreboard frames

Frames are the line animation frames. Frames can utilize META data, colors, and effects. As detailed in the previous section, a scoreboard line loops through all frames within that line.

Meta data

Frame meta is created by placing |....| in front of the frames. Data entered between these | characters is treated as meta data an will be used to configure visual aspects of those individual frames.

yaml
- '|score:NUMBER|Test'

This will show a line where the red number is forced to a specific number. You can also use placeholders.

yaml
- '|NUMBER|Test'

Similar to |score:NUMBER|, this will show a line where the red number is forced to a specific number. You can also use placeholders.

yaml
- '|hide|Test'

This will hide the line from the scoreboard when this particular frame is shown on the screen.

yaml
- '|show|Test'

This will show the line on the scoreboard. It can be used in conjunction with |hide| to hide or show a scoreboard line depending on a state.

yaml
- '|static|Test'

This will force a line to be static (longer in length). However, the middle part will not animate. The results are unpredictable and should only be used by those who know what they are doing.

yaml
- '|visible:true|Test'

This will show or hide the scoreboard line depending on if TRUE or FALSE. Useful for dynamic visibility. It functions similarly to |show| and |hide|.

yaml
- '|disabled|Test'

This frame will be ignored when loading. Useful if you want to remove frames from the lines. Other than |hide|, the line will not disappear, but the frame will be skipped when animating.

yaml
- '|font:featherboard:default|Test'

This will use the default font of FeatherBoard. You can also use custom fonts by specifying the font identifier.

Multiple meta data can be applied by separating it with a single |. In the example below, the score is set to the placeholder of the used RAM while also ensuring the line is shown.

yaml
- '|%server_used_ram%|visible:true|RAM usage: '

Animation Creator

If you want an easy way to create advanced animations, you can use the tool called 'AnimationCreator' created specifically for FeatherBoard. This is a GUI application that runs on Linux, Windows, and Mac: AnimationCreator

Images

Scoreboards can optionally include images. When a scoreboard uses images, a resource pack has to be downloaded by the client. FeatherBoard will automatically trigger the player to download a resource pack when showing a scoreboard that uses images.

yaml
images:
  - identifier: "heart-icon"
    url: "https://featherboard.org/images/default/heart-icon.png"
    height: 16
    width: 16
    x-offset: 0
    y-offset: 0
  - identifier: "image 2"
    file: "myimage.png"
    ...

Images require a identifier that specifies the name of the image. Next, they require either a url or file that points to the image. Each scoreboard line takes a height of 16 pixels. FeatherBoard can scale your images depending on the specified height and width settings.

Offset

Images can have an X and Y offset. By default, both are 0 and can be configured between 256 and -256. You can also manually create a Y offset by using a placeholder: \{\{ offset:-200 }} which will move the image or text to the left.

Example: \{\{ offset:-200 }}\{\{ image:heart-icon }} will show the image outside the scoreboard.

Usage

You can use images by using them as a placeholder like \{\{ image:heart-icon }}. This will be replaced with the image. Similar to animation effects, you can create multiple frames with multiple different images to animate the image.

Fonts

Scoreboards can use custom fonts. The font file should be placed in the /scoreboard/ directory. The font file should be a .ttf file. The font can be used by specifying the identifier and the file of the font.

Alternatively, you can use a url to download the font from the internet. This is useful if you want to use a Google Font, for example.

yaml
# Fonts
fonts:
  - identifier: "roboto"
    # The font file should be placed in the /scoreboard/ directory
    # file: "myfont.ttf"
    url: "http://fonts.gstatic.com/s/roboto/v15/7MygqTe2zs9YkP0adA9QQQ.ttf"
    # The size of the font
    size: 16
    shift-x: 0
    shift-y: 0
    oversample: 2.0

Usage

You can use fonts by providing metadata in a line. The font identifier is used to specify the font and is prefixed with featherboard:. If you want to use the default font, you can use minecraft:default.

yaml
lines:
  - frames:
      - '|font:featherboard:roboto|Test'

Scripts

FeatherBoard can execute scripts that are in the configuration. The script can access the Java classes of the plugin, allowing you to manipulate the scoreboard using JavaScript.

This is useful if you have settings that dynamically change the scoreboard (like animation duration, etc.). Every script receives two variables that are passed by reference:

  • board: This is the instance of the org.featherboard.api.scoreboard.Scoreboard you are creating.
  • settings: This is a Map with String as key and String as value containing the current settings.
  • logger: This is a logger of the plugin.

script-pre

This script is executed before the lines are added. This is useful if you want to add settings that need to be replaced in the scoreboard lines.

yaml
script-pre: |
  var meta = board.getMeta();
  var existingSettings = meta.getSettings();
  existingSettings.put("glowspeed",(parseInt(settings["vertical-glow-interval"]) + 10).toString());

script-post

This script is executed after the lines are added. This is useful if you want to add additional lines, etc.

yaml
script-post: |
  var titlePart = board.getParts().get(0);
  titlePart.addLine('YOLO');

Settings

Each scoreboard can have its own settings. The settings can override default settings from the main config or add some additional options. An important aspect of these settings is that they can also replace a specific syntax of placeholders in the lines, making them ideal to apply color themes, etc.

yaml
settings:
  setting1: "test"
  setting2: "test2"

Settings that affect the behavior

  • include-in-debug: Boolean that indicates if the scoreboard should be included in the debug.
  • priority: Number that indicates the priority of the scoreboard. Higher number = higher priority.
  • scoreboard-assigning: Override the assigning method. Same as in the main config but just one.
  • prevent-override: Boolean that indicates if the scoreboard should not be overridden by other non-FeatherBoard scoreboards.
yaml
settings:
  priority: 10

Settings as placeholders

Settings will replace \{\{ setting:SETTINGNAMEHERE }} in the scoreboard lines. A practical example will be shown later.

Setting objects

Settings can be more than just key-value pairs. The value can also be a list, object, etc., or whatever you can use inside your script-pre or script-post. Keep in mind that you can't use all objects as placeholders.