Built-in Modules

Contains documentation for modules that are built-in the BattleArena plugin.

Arena Restoration

BattleArena comes pre-installed with an arena restoration module. This module lets you restore arenas once a competition has concluded. This module requires WorldEdit in order to function.

Configuring the Module

This module can be enabled by adding arena-restoration to the modules section of your Arena Configuration. You will also want to add the restore-arena action when you wish to restore the arena. Here is an example of an arena that restores once the on-complete event has been called:

  victory:
    allow-join: false
    allow-spectate: false
    next-phase: waiting
    duration: 5s
    events:
      on-complete:
        - leave
        - restore-arena

Once added to your config, run /battlearena reload to reload the plugin, then for your arena, you can run /arena schematic <map> to create a schematic of your map. This will be based on the arena boundaries configured in the Map Creation process. Once the event you have placed the restore-arena action is called, the arena will be restored the schematic set.

Boundary Enforcer

BattleArena comes pre-installed with a boundary enforcer module which ensures that players do not leave the bounds of an arena.

Configuring the Module

This module can be enabled by adding boundary-enforcer to the modules section of your Arena Configuration. No other configuration is required from this point, and once BattleArena has been reloaded with /battlearena reload, players will be unable to leave the arena boundaries configured in the Map Creation process.

Classes

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

Configuring the Module

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

Classes Configuration

This module adds a classes.yml to BattleArena, which can be found in plugins/BattleArena/classes.yml. Here is an example of a class included inside of the classes YML file:

classes:
  warrior:
    name: Warrior # The name of the class
    # The items included in the class
    items:
      - iron_sword
      - cooked_beef{amount=16}
      - golden_apple{amount=2}
    # What the player will be given in their armor/offhand slots
    equipment:
      helmet: iron_helmet
      chestplate: iron_chestplate
      leggings: iron_leggings
      boots: iron_boots
      offhand: shield

Additionally, if you wish to restrict certain classes by arena, the classes.yml file includes a require-permission option (default: true), which means the player must have the "battlearena.classes.equip.<class>" permission.

Arena Configuration

By default, this feature is used in the built-in arena.yml, and is configured to let you "select" a class while in a waiting or countdown phase, with the class being equipped once the game enters the ingame phase. The options used are documented below.

Options

Option

Description
Syntax
class-equipping
Whether class equipping is enabled using the /<arena> equip <class> command.
class-equipping={enabled=<true|false>}
class-equip-only-selects
Whether class equipping only "selects" a class, and must be applied in the arena by using the equip-class option.
class-equip-only-selects={enabled=<true|false>}

Actions

Equip Class

Duels

BattleArena comes pre-installed with a duels module that lets you duel other players in an arena.

Configuring the Module

This module can be enabled by adding duels to the modules section of your Arena Configuration. No other configuration is required from this point, and once BattleArena has been reloaded with /battlearena reload command, players will be able to use the /<arena> duel <player> command to duel another player. Players must also be granted the battlearena.command.<arena>.duel permission.

 

One in the Chamber

BattleArena comes pre-installed with a one in the chamber module which adds an ability for players to one-shot others when a bow is used. Additionally, any time a player scores a kill on another player, they are granted an arrow.

Configuring the Module

This module can be enabled by adding one-in-the-chamber to the modules section of your Arena Configuration. No other configuration is required from this point, and once BattleArena has been reloaded with /battlearena reload, the arena this module is configured on will support one in the chamber.

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

Line Types

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

Simple
Player List
Top Stat
Top Team Stat

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.

Team Colors

BattleArena comes pre-installed with a team colors module which colors a player's username based on their team color, and gives them a prefix with their team name.

Configuring the Module

This module can be enabled by adding team-colors to the modules section of your Arena Configuration. No other configuration is required from this point, and once BattleArena has been reloaded with /battlearena reload, the module will be activated in the arena.

However, if prefixes are not desired and only coloring the player name based on the team color is desired, the prefixes feature can be disabled by adding team-prefixes{enabled=false} to your arena options.

Team Heads

BattleArena comes pre-installed with a team heads module which lets you add the team item configured in teams.yml to the player's head.

Configuring the Module

This module can be enabled by adding team-heads to the modules section of your Arena Configuration. You can then use the team-heads action in any event to equip the team item onto the player's head. This option is used by default in ArenaPaintball.

Tournaments

BattleArena comes pre-installed with a tournaments module which lets you run bracket tournaments in BattleArena. This is a slightly different module than the rest in that tournaments are not configured per-arena, and instead all tournament options are in a global tournament-config.yml

Configuring the Module

# Whether to broadcast when tournaments start to all players on the server.
broadcast-tournament: true

# How long until each round starts in the tournament after the previous
# round has ended. It is recommended to keep this value at 10s or higher
# to allow for players to be removed from the arena and for the arena to
# be reset fully.
advance-time: 10s

# The commands to run when a player wins a tournament. The argument
# %player_name% will be replaced with the player's name. The commands are run
# in the console. These are executed individually for each player, so be careful
# with commands that affect multiple players (like message broadcasts.
commands-on-win:
  - "give %player_name% diamond 16"

The default config is included above.

Running a Tournament

A tournament can be started using the /tournament create <arena> command. Keep in mind that some arenas may not be capable of running tournaments and the following is required of an arena type to support tournaments:

Once a tournament is created, players can join using the /tournament join <arena> command. Once players have joined, a server administrator can start the tournament using /tournament start <arena>. If a server administrator desires to end a tournament early, they can run /tournament end <arena>.

Vault Integration

BattleArena comes pre-installed with a Vault integration module which hooks into currency plugins and lets you give or take currency or permissions.

Configuring the Module

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

Actions

Add Permission
Remove Permission
Edit Currency