Chapter 1

Basic

Include some basic knowledge before using the plugin

Subsections of Basic

Definition

Game

Game is a standard unit in which we define logic, sequences & tasks to be performed so that the players would join & have fun the way we want. In this plugin, Game is commonly provided by developers who have ideas for some ways to entertain the players.

Arena

Arena is “game in action”, which is usually a place Game takes part in. Operators would configure aspects of a specific Game to make it an Arena.

Planner

Planner is the biggest unit of the plugin. It’s a unit to handle multiple Arenas, usually for scheduling which Arena would be run at a certain time.

Picker

Picker is a part of a Planner that chooses which Arena will be run. it can be configured by operators to specify how to choose (pick) an Arena.

Command

Main Command

  • /gitb reload

    • Permission: gamesinthebox.reload
    • Description: Reload the plugin
  • /gitb action <planner> <action> [args]

    • Permission: gamesinthebox.action
    • Description: Perform an action in the current arena of the planner
    • Argument:
      • <planner>: The Planner to perform the action on the Arena
      • <action>: The action to perform
      • [args]: The arguments required by the action
    • Note:
      • You can type /gitb action <planner> to get the list of available actions
  • /gitb end <planner>

    • Permission: gamesinthebox.end
    • Description: Force the planner to end the current arena of the planner
    • Argument:
  • /gitb forcepick <planner>

    • Permission: gamesinthebox.forcepick
    • Description: Force the planner to pick the next arena
    • Argument:
      • <planner>: The Planner to force the picker
  • /gitb setgame <planner> <arena>

    • Permission: gamesinthebox.setgame
    • Description: Set the next arena in the planner
    • Argument:
  • /gitb expansion

    • Permission: gamesinthebox.expansion
    • Description: Get the running expansions of the plugin

Editor Command

Permission: gamesinthebox.editor

  • /gitbeditor usage <game>

    • Description: Get the usage of the editor. It’s usually about the available actions that can be performed on the editor
    • Argument:
      • <game>: The Game to edit
  • /gitbeditor save <game> <planner> <arena> [override]

    • Description: Save the settings of the game to the planner as an arena
    • Argument:
      • <game>: The Game to save
      • <planner>: The Planner that the Game would be saved to
      • <arena>: The name of the Arena that the Game would be saved as
      • [override]: Whether to override current settings if the Arena exists. Default to false if not specified
  • /gitbeditor action <game> <action> [args]

    • Description: Perform an action on the editor
    • Argument:
      • <game>: The Game to perform the action
      • <action>: The action to perform
      • [args]: The arguments required by the action
  • /gitbeditor reset <game>

    • Description: Reset the editor
    • Argument:
      • <game>: The Game to edit
  • /gitbeditor status <game>

    • Description: Get the status of the editor
    • Argument:
      • <game>: The Game to edit
  • /gitbeditor migrate <game> <planner> <arena>

    • Description: Migrate the settings from an arena
    • Argument:
      • <game>: The Game to migrate the settings
      • <planner>: The Planner that has the Arena to migrate to
      • <arena>: The Arena to migrate the settings to

Config

# Settings for games that involve blocks
block-util:
  # How many blocks to be placed for each call
  blocks-per-tick: 50

  # The delay before calling the next tick
  block-delay: 0

  # The maximum blocks to be placed (-1 for unlimited)
  max-blocks: -1

  # Should the plugin use FastAsyncWorldEdit if it exists ?
  use-fawe: true

# Settings for Planners
planner:
  # The delay between Planner's tick
  interval: 20

  # Should the planner run asynchronously ?
  async: true

Variable

The plugin provides built-in variables for Game, Arena & Game. These variables can be used in game messages and actions.

Built-in variables

VariableDescription
{planner_name}The name of the planner
{planner_game_name}The display name of the game of the current arena of the planner
{planner_game_local_name}The name of the current arena of the planner
{planner_state}The current state of the planner
{planner_game_state}The state of the current arena of the planner

Hook to PlaceholderAPI

The variables can be used in PlaceholderAPI with this format:

%gamesinthebox_<planner>:<variable>%
  • <planner> is the name of the planner to request
  • <variable> is the plugin variable without curly brackets {}

For example, if you want to get the {planner_game_state} of a planner named my_game, the placeholder for that will be

%gamesinthebox_my_game:planner_game_state%