- You can now set environment variables for the MySQL data that will take precedence over the config values. This is a more secure alternative than putting credentials in the config file. The plugin will log that it used environment variables on startup if they are set up correctly.
- Completely revamped how rewards and console commands are handled after a game completes. There will now be a rewards.yml in the plugin folder, which allows for much more flexibility in configuring which commands should run when. New features include being able to give a reward to a player only once, give a reward on the condition of a maximum or minimum score, and more options for multiplayer games. PlaceholderAPI is supported in the command strings. The legacy commands set in config.yml will continue to be supported as well, but these offer far fewer capabilities.Code:LOBBYGAMES_MYSQL_HOST LOBBYGAMES_MYSQL_USERNAME LOBBYGAMES_MYSQL_PASSWORD LOBBYGAMES_MYSQL_NAME
Code:#----------------------------------------------------------------------------------------------------------------------# # # This is the LobbyGames rewards file. Use this to configure how games will handle running # commands after a player finishes a game. # #----------------------------------------------------------------------------------------------------------------------# snake: any-reward-name-here: enabled: false min-score: 40 console-commands: - "broadcast &2&l%player%&a got a score of %score% in snake!" - "eco give %player% 10000" first-time-reward-example: enabled: false one-time: true #A player can only ever get this reward once with this option msg: "&bYou completed your first snake game!" console-commands: - "eco give %player% 100" pool: simple-multiplayer-example: enabled: false for-winning-player: true #only give this reward for the player who won (default is false) console-commands: - "eco give %player% 100" soccer: teleport-to-spawn-example: enabled: false per-player: true #'true' runs this command for each player in the game when the game ends (default) run-on-quit: true #if the reward/command should be given every time the player leaves the game, even if it has not started (ex. for teleporting player back to spawn) console-commands: - "minecraft:tp %player% 100 100 100 0 0" no-per-player-example: enabled: false per-player: false #run once when the game ends instead of for every player. Can not use %player% when this is set to false console-commands: - "broadcast &b%winners% won against %losers% in Soccer!" 2048: clicker: connect4: minesweeper: spleef: sudoku: tictactoe:
- All leader boards will periodically check for name updates on their entries. If you have use-display-names set to true, the player must be online for it to know that their rank or name prefix has changed.
- Fixed a small bug regarding how leader boards are configured with the use-display-names option. When set to true, this option will use the player's tab list name on leader board entries. When false, it will use their normal name.
- Updated the links in the wiki. The old link will continue to redirect to the same page.
New Wiki Link: https://github.com/Unfaxed/lobbygames_wiki/wiki/Getting-Started
- Made the 1's in Sudoku be purple and 2's be dark blue so that the colors look more distinct. All the other colors are the same.
- Fixed a bug where the server might make infinite tries to load an arena if it can't correctly find the world, such as if the world was renamed offline or no longer exists. It will now ignore the world and send a warning in the console if it can not find the world the arena is in.
Added a new custom event, LeaderboardSurpassEvent, to the API. This event is called whenever a player beats another player's score on a lobbygames leaderboard. A config option/interface will be provided in a future update, but for now, here is some example code:
Code:@EventHandler public void onLeaderboardSurpass(LeaderboardSurpassEvent e) { if (e.getSurpassedPlayerOldRank() == 1) { //new player for 1st place //whatever code here String playerName = e.getPlayer().getName(); //the player that went up in ranking String surpassedPlayerName = e.getSurpassedPlayer().getName(); //the player who went down in ranking String gameName = e.getLeaderboard().getPlugin().getOutgoingGameAlias(e.getLeaderboard().getGameType()); //API example for game type name String msg = ChatColor.GREEN + playerName + " took 1st place from " + surpassedPlayerName + " in " + gameName + "!"; Bukkit.broadcastMessage(msg); } }
- If an admin does /papi reload, you can now use /lg reload to re-register the LobbyGames PAPI placeholder hook.
- Fixed a bug in spleef where spectators would not lose their invisibility in some cases when the game ends.
- Fixed a bug in spleef where the eliminated player message would not run if a player in the game disconnected.
- Added command tab-complete for /lg delete arena ids.
- When a player pockets all of the balls in pool, they will now receive a more specific message to clarify why the game (or practice game) ended.
This update adds the following to the config:
Code:pool: #add the indented line to the pool section pocketed-all-balls: "&aAll balls were pocketed!"
- Fixed a bug in Connect 4 where particles caused an error in servers running any Minecraft version before 1.13 (legacy versions).