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.
- Instead of typing a number to represent a color in pool.solids-color and pool.stripes-color, you can now type in the name of the color. Existing config files do not need to update.
- Fixed an error that was appearing in the console under certain circumstances when the plugin tried to refresh the text on the leader board's holograms.
- 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.
- 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 (Text):
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.
Spoiler: SoccerBallEntity interface
Code (Text):
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:
Spoiler: SlimeSoccerBall.java
Code (Text):
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 (Text):
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.
- Added ball-size and ball-speed to the soccer configuration section. This allows you to change the game dynamics to match how your players want it.
Spoiler: Soccer Section Addition
Code (Text):
#soccer: (add this to the existing soccer section)
ball-size: 3 #Minimum 2, maximum 12, default 3
ball-speed: 2 #Minimum 1, maximum 6, default 2
#other soccer config lines...
- The default configuration file will now use literal block scalars wherever possible, making it much easier to edit multi-line config messages.
- Fixed small console errors that were caused by the legacy reward system. It is safe to delete any console-command-on-end or -on-quit lines from the config if you are using rewards.yml.
We also use cookies, as they are essential for the proper