Skip to main content

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

  • <, > denotes a required option
  • [, ] denotes an optional option
  • Options are separated using the semicolon (;)
Equip Class
  • Description: Equips a class for a player
  • Options
    • <class> The class to equip. By default, if a player has selected a class, this will only run if they have not selected one
    • [clear-inventory] Whether the player's inventory should be cleared when they select a class (default: true)
    • [ignore-player-selection] Whether a player's selection should be overridden (default: false)
  • Syntax
    • equip-class{class=<class>;clear-inventory=[clear-inventory];ignore-player-selection=[ignore-player-selection]}