Skip to main content

Scoreboards

BattleArena comes pre-installed with a scoreboards module that lets you configure scoreboards for an arena.

Configuring the Module

This module can be enabled by adding scoreboards to the modules section of your Arena Configuration.

Scoreboards Configuration

This module adds a scoreboards.yml to BattleArena, which can be found in plugins/BattleArena/scoreboards.yml. In this file, you can configure scoreboard templates which can be used across any arena. Here is an example of a template used in the waiting phase and in-game phase.

templates:
  waiting:
    title: "<gold>Waiting for players..."
    refresh-time: 1s
    lines:
      - simple:
          lines:
            - " "
            - "<yellow>Players: <white>%online_players%/%max_players%"
            - "<yellow>Map: <white>%map%"
            - " "
            - "<white>battleplugins.org"
  ingame-list:
    title: "<gold>%arena%"
    refresh-time: 1s
    lines:
      - simple:
          lines:
            - " "
            - "<yellow>Map: <white>%map%"
            - "<yellow>Time remaining: <white>%time_remaining_short%"
            - " "
            - "<yellow>Players:"
      - player-list:
          max-entries: 8
      - simple:
          lines:
            - " "
            - "<white>battleplugins.org"

Template Options

  • title: The title of the scoreboard
  • refresh-time: How quickly the scoreboard contents will be updated
  • lines: A list of the lines to include. 

Line Types

This contains all the line types you can include in the scoreboard.

Simple
  • Description: Shows a static list of lines, which will always be visible on the scoreboard.
  • Options
    • lines (string list): A list of the lines to include
Player List
  • Description: A line type which dynamically shows a list of players that are in the game. The line count will update based on how many players are in the game
  • Options
    • max-entries The maximum number of lines this section will occupy
    • show-team-color Whether the player's name should include the team color
    • require-alive Whether only alive players should be shown in the scoreboard
Top Stat
  • Description: A line type which shows a list of players ordered by which player has the highest of a certain stat (i.e. kills)
  • Options
    • max-entries The maximum number of lines this section will occupy
    • stat The name of the stat to display on the scoreboard
    • stat-color The color of the stat
    • ascending Whether to display the stat in ascending order
    • show-team-color Whether the player's name should include the team color
Top Team stat
  • Description: A line type which shows a list of teams ordered by which team has the highest of a certain stat (i.e. kills)
  • Options
    • max-entries The maximum number of lines this section will occupy
    • stat The name of the stat to display on the scoreboard
    • stat-color The color of the stat
    • ascending Whether to display the stat in ascending order

Arena Configuration

Scoreboards can be applied using the apply-scoreboard action, with the scoreboard option set to the scoreboard name. As an example: apply-scoreboard{scoreboard=waiting}.

This is also used in the default arena.yml file.