If you're updating your ChatGames version from 1.3 -> 2.0 then there are some things that you will need to be aware of in order for your new configuration to work. Many things have been changed and refactored in the config.yml file and the messages.yml file. You can avoid making these changes yourself if you delete the config.yml and messages.yml file, however you will then lose any games that you have configured.
It is recommended to simply save the games to another file, delete the files and then repopulate the new configuration files with your games. If you would rather make the changes yourself, then read on to see how you will need to change your files to fit the new format.
Config.yml Changes
Game Counter
A few new options have been changed in this file, as well as several things being renamed. First and foremost there is now a game-counter added to the config file. This tracks how many games have run since the plugin has been installed, and can be retrieved through Placeholders.
# Game Counter - How many games have been run since the plugin has started?
game-counter: 0
MySQL Database
MySQL is now a supported save type for the plugin. This will save the player scores as well as whether or not the player has their games muted. You will need to add the following to your config.yml file in 2.0.0.
You will need to change the database details to valid credentials in order to connect to your MySQL database.
Math Refactor
The math game has now been refactored and will require you to change the config file. This is due to the math game now having support for HARD, EASY or BOTH difficulty types. Each type also independently handles rewards so that you can reward harder questions differently than easy questions.
# Maths game module to auto-generate equations
maths:
enabled: true
difficulty: BOTH # EASY / HARD / BOTH
rewards:
hard:
commands:
- 'eco give %player% 75'
broadcast:
- '&7%player% &ehas won &6$50&e for solving &7%question%&e first!'
easy:
commands:
- 'eco give %player% 50'
broadcast:
- '&7%player% &ehas won &6$50&e for solving &7%question%&e first!'
Custom Games
"Custom" games have now been renamed to Trivia. You will notice this through the plugin that they will be referred to as trivia. All you need to do for this is rename the "custom:" configuration section to "trivia:" like so:
trivia:
enabled: true
whomademinecraft:
question: 'Who created Minecraft?'
answer: 'Notch'
rewards:
broadcast:
- '&7%player% &ehas won &6$50&e by getting the correct answer: &6&l%answer%!'
commands:
- 'eco give %player% 50'
Messages.yml Changes
The messages file has also been changed and will now require some new options added in order for your plugin to work correctly. Below you will find the new options that you can add into your messages.yml file.
# Command Aliases
command-hologram: 'hologram'
command-scoreboard: 'scoreboard'
# Answer Progress
answer-progress: '&eYou have guessed &7%cg_prog%&e/&6%answer_length% &eletter''s correctly.'
# Game Message Header
message-header:
- '&7-------------------------------------------------'
- ' &6ChatGames'
- '&7-------------------------------------------------'
# Game Message Footer
message-footer:
- '&7-------------------------------------------------'
# %<type>_player_<position>% - Will return the player name at the specified position for the game.
# %<type>_score_<position>% - Will return the score of the player at the specified position for the game.
# Reaction Score Hologram
reaction-scoreboard:
- '&8[&a&lReaction Hi-Scores&8]'
- '&6&l1st: &7%reaction_player_1% : %reaction_score_1%'
- '&9&l2nd: &7%reaction_player_2% : %reaction_score_2%'
- '&c&l3rd: &7%reaction_player_3% : %reaction_score_3%'
- '&b&l4th: &7%reaction_player_4% : %reaction_score_4%'
- '&b&l5th: &7%reaction_player_5% : %reaction_score_5%'
# Unscramble Score Hologram
unscramble-scoreboard:
- '&8[&a&lUnscramble Hi-Scores&8]'
- '&6&l1st: &7%unscramble_player_1% : %unscramble_score_1%'
- '&9&l2nd: &7%unscramble_player_2% : %unscramble_score_2%'
- '&c&l3rd: &7%unscramble_player_3% : %unscramble_score_3%'
- '&b&l4th: &7%unscramble_player_4% : %unscramble_score_4%'
- '&b&l5th: &7%unscramble_player_5% : %unscramble_score_5%'
# Trivia Score Hologram
trivia-scoreboard:
- '&8[&a&lTrivia Hi-Scores&8]'
- '&6&l1st: &7%trivia_player_1% : %trivia_score_1%'
- '&9&l2nd: &7%trivia_player_2% : %trivia_score_2%'
- '&c&l3rd: &7%trivia_player_3% : %trivia_score_3%'
- '&b&l4th: &7%trivia_player_4% : %trivia_score_4%'
- '&b&l5th: &7%trivia_player_5% : %trivia_score_5%'
# Math Score Hologram
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%'
# Total Score Hologram
total-scoreboard:
- '&8[&a&lTotal Hi-Scores&8]'
- '&6&l1st: &7%total_player_1% : %total_score_1%'
- '&9&l2nd: &7%total_player_2% : %total_score_2%'
- '&c&l3rd: &7%total_player_3% : %total_score_3%'
- '&b&l4th: &7%total_player_4% : %total_score_4%'
- '&b&l5th: &7%total_player_5% : %total_score_5%'
Messages.yml Refactor
It should also be noted that in the messages.yml file, any reference to the word problem has now been replaced with the word question. Likewise any reference to the word solution has now been renamed to answer. If these words are present in your Messages.yml file in the form of keys (not the text that you change) or in the form of placeholders; you will need to change them.`