LobbyGames ✅ High Quality Minigames ⭕ 100% Customizable ⚡ Increase Player Retention

MC Plugin LobbyGames ✅ High Quality Minigames ⭕ 100% Customizable ⚡ Increase Player Retention 2.6.3
Create Pool Tables, Soccer / Football, Connect 4, Snake, 2048, Minesweeper, Tic Tac Toe, and more!

- Increased the priority for the 2048 and Snake PlayerMoveEvent so that it is less likely that other plugins will mistakenly un-cancel the event while the player is in the game.
- Fixed a bug with rewards.yml where it was unable to load rewards for Connect 4 or Tic Tac Toe due to a mismatch in the outgoing game alias/name and config name.
- Fixed a small console error that was occurring during 2048 gameplay regarding queued moves
- Fixed an issue with 2048 where it would not honor the rewards.yml win condition if the player had created a 2048 tile.
- You can now configure the snake game to use a custom material for the snake! This update also adds the ability to make the first block (the head) be a different type.
This update adds 2 lines to the config, under the existing snake section:
Code:
snake: #add this to the existing section, don't create a new section
  head-material: "WHITE_CONCRETE"
  body-material: "WHITE_WOOL"
- Fixed a bug that was happening on some servers where the soccer ball would despawn when the game started.
- Fixed an issue where the fireworks displayed on a soccer/football goal were too low, they should now be more visible
- There is no longer a quit confirmation when a player clicks the arrow item when waiting for a soccer/football game to start, it will just teleport them to the arena's spawn.
- Fixed an exception that was occurring with /lg reload in the condition that use-display-names was false in the config and if it tried to load an invalid UUID for a leader board.
- Added a way to completely customize the soccer ball through the API. More ways will be built into the plugin in the future, but for now, this gives administrators the ability to code something custom. This API also allows for there to be multiple entities associated with the soccer ball.
Code:
public interface SoccerBallEntity {
  
    /**
     * LobbyGames soccer ball size from config
     * @param size
     */
    public void setSize(int size);
  
    /**
     * Used for spawning and respawning.
     * The game will also respawn the ball when if an entity with a UUID in the UUID set is killed
     * @param loc
     */
    public void spawn(Location loc);
  
    public void teleport(Location loc);
  
    public void remove();
  
    public boolean isValid();

    public boolean containsUUID(UUID u);
  
    public Location getLocation();
  
    public World getWorld();
  
    /**
     * In some advanced use cases, the ball may need a manual check for when a player punches it (ex. block displays).
     * This is initialized by the Soccer game during its initialization
     * @param consumer
     */
    public void setClickConsumer(Consumer<Player> consumer);

}
Example for how the Slime is implemented with this interface:
Code:
public class SlimeSoccerBall implements SoccerBallEntity {
  
    private Slime slime;
    private int size = 3;
  
    public void spawn(Location loc) {
        remove();
        slime = loc.getWorld().spawn(loc, Slime.class);
        slime.setSize(size);
        slime.setAI(false);
    }

    public void teleport(Location loc) {
        slime.teleport(loc);
    }

    public void remove() {
        if (slime != null) slime.remove();
    }

    public boolean isValid() {
        return slime != null && !slime.isValid();
    }

    public boolean containsUUID(UUID u) {
        return slime.getUniqueId().equals(u);
    }

    public Location getLocation() {
        return slime.getLocation();
    }

    public World getWorld() {
        return slime.getWorld();
    }

    public void setSize(int size) {
        this.size = size;
        if (slime != null) slime.setSize(size);
    }

    public void setClickConsumer(Consumer<Player> consumer) {
        // some use cases (ex. block displays) may require a manual way to detect when the player punches the ball
    }
  
}
The custom soccer ball entity can be used via Soccer::setSoccerBallEntity or via the constructor Soccer(LobbyGames plugin, Arena arena, Player p1, SoccerBallEntity ballEntity).
- Set all armor stands spawned by the plugin to have NoAI, this might help with preventing interference from other plugins.
- You can now disable the /lg join sub-command in the config. This is helpful if players should only be able to join a lobby game through something like a GUI (where the console will run /lgjoinplayer) or through clickable signs.
- You can now disable the alias commands, such as /pool, /2048, etc. However, it is not possible to prevent the commands from tab-completing even if they are disabled.
- The /lgjoinplayer command will no longer prevent a player from teleporting to a different world if interworld-teleportation-enabled is false in the config.
- Fixed a bug in pool where the click cooldown was incorrectly applied to both players.

Added these lines to the config:
Code:
lg-join-command-enabled: true #without /lg join, players can only join via the console running /lgjoinplayer or via clickable signs
alias-commands-enabled: true #whether /soccer, /2048, /snake, etc. should be enabled
- Fixed a bug where it could be possible for spectators to not be properly removed when a game such as soccer or spleef completed.
- 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.
Top Bottom