---
description: 'Game Type: Math'
---

# Math

## What are Math Games?

Math Games are Chat Games in which you can test your players mathematic ability. The plugin will generate equations based on your difficulty setting, and will broadcast it to all eligble players. Your players will then race to solve the equation and the first player with the correct answer will win.

## How do I configure a Math Game?

The Math Game system is very straight forward as the equations are randomly generated by the plugin, thus you only need to worry about changing settings rather than coming up with your own equations. As shown below you can change settings for difficulty as well as what will happen when a player wins a Math Game.

```yaml
# Math
maths:
  enabled: true # Should we enable this game-type?
  difficulty: BOTH # What should the difficulty be? Supports EASY, HARD or BOTH
  rewards: # How should we handle the rewards when a player wins?
    hard: # If the math question was a 'HARD' question then we will use these commands
      commands: # Commands to run for the winner | Supports %player%
        - 'eco give %player% 75'
      broadcast: # Broadcast to the whole server | Supports %player%, %question% and %solution%
        - '&7%player% &ehas won &6$50&e for solving &7%question%&e first!'
    easy: # If the math question was an 'EASY' question then we will use these commands
      commands:
        - 'eco give %player% 50'
      broadcast:
        - '&7%player% &ehas won &6$50&e for solving &7%question%&e first!'
```

## Math Messages

You can also change the messages that are displayed in game when a reaction game is started, won or lost. You are able to change these inside the messages.yml file. The below values show you how to change the default messages:

```yaml
# Math Game Format
math-start: '&eSolve the following to win a prize: &7%question%'
math-lose: '&7Nobody won! The correct word was &b&l%answer%.'

# Math Hologram Format
math-scoreboard:
  - '&8[&a&lMath Hi-Scores&8]'
  - '&6&l1st: &7%math_player_1% : %math_score_1%'
  - '&9&l2nd: &7%math_player_2% : %math_score_2%'
  - '&c&l3rd: &7%math_player_3% : %math_score_3%'
  - '&b&l4th: &7%math_player_4% : %math_score_4%'
  - '&b&l5th: &7%math_player_5% : %math_score_5%'
```
