Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
- Made performance improvements to the MySQL system allowing it to offload more work to asynchronous threads.
- Made the default leaderboard-entry-expiration -1 in the default config for no expiration by default.
- Added asynchronous functions to the LobbyGames API to specify clearly whether a player stats query should run synchronously or asynchronously. Note that PlaceholderAPI integration must run a synchronous query when there is a cache miss.
- 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.
Spoiler: Environment Variables
Code (Text):
LOBBYGAMES_MYSQL_HOST
LOBBYGAMES_MYSQL_USERNAME
LOBBYGAMES_MYSQL_PASSWORD
LOBBYGAMES_MYSQL_NAME
- 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.
Spoiler: Default rewards.yml
Code (Text):
#----------------------------------------------------------------------------------------------------------------------#
#
# 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 (Text):
@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);
}
}
- 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 (Text):
pool: #add the indented line to the pool section
pocketed-all-balls: "&aAll balls were pocketed!"
- The command to clear a leaderboard will now work with local leaderboards. The new usage is /lg leaderboard clear <game> [arena id], where if a number is supplied, it will clear that arena's local leaderboard if it exists. If no arena ID is supplied, it will work as before by clearing all of the global leaderboards for that game.
- Added a simple afk timer that will kick a player from the lobby game (same as them doing /lg quit) after a certain number of seconds of no motion
- Players can now double-tap the space bar to get the boost jump on soccer (if the boost jump is enabled). This is the same as clicking the item.
- Players can now boost jump in soccer before the game starts
This update adds the following lines to the config:
Code (Text):
afk-kick-seconds: 90 #simple afk check if player does not move for too long. Set to -1 to disable
afk-kick-msg: "&cYou were kicked from %game% for being afk!"
We also use cookies, as they are essential for the proper