Skip to content

Commit

Permalink
Describe lobby feature in README, add documentation page with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
timvisee committed Nov 15, 2021
1 parent aca09df commit 73d0c86
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ https://user-images.githubusercontent.com/856222/141378688-882082be-9efa-4cfe-81
- Hold: hold clients when server starts, relay when ready, without them noticing
- Kick: kick clients when server starts, with a starting message
- Forward: forward client to another IP when server starts
- _Lobby: keep client in emulated server with lobby world, teleport to real server when ready ([experimental*](./docs/join-method-lobby.md))_
- Customizable MOTD and login messages
- Automatically manages `server.properties` (host, port and RCON settings)
- Graceful server sleep/shutdown through RCON (with `SIGTERM` fallback on Linux/Unix)
Expand Down
87 changes: 87 additions & 0 deletions docs/join-method-lobby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Join method: lobby

**Note: this is highly experimental, incomplete, and may break your game. See
[warning](#warning).**

The lobby join method allows you to keep clients in a lobby world while the
server is starting. When the server is ready, the player is _teleported_ to the
real server.

`lazymc` emulates a fake server with an empty lobby world. The player is put in
this world, floating in space. A custom message is shown on the client to notify
we're waiting on the server to start.

![Lobby screenshot](../res/screenshot/lobby.png)

## Warning

This feature is highly experimental, incomplete and unstable. This may break the
game and crash clients. Don't use this unless you know what you're doing. Never
enable this in a production environment.

Current limitations:

- Only works with offline mode
- Only works with vanilla Minecraft clients, does not work with modded (e.g. Forge, FTB)
- Probably only works with Minecraft 1.16-1.17.1 (tested with 1.17.1)
- This method will consume the client, following configured join methods won't be used.

At this time it is unknown if some of the above limitations will ever be lifted,
or if this will ever be implemented in a robust manner.

## Usage

_Note: you must use `lazymc v0.2.0` or above with the `lobby` feature enabled._

To try this out, simply add the `"lobby"` method to the `join.methods` list in
your `lazymc.toml` configuration file:

```toml
# -- snip --

[join]
methods = [
"lobby",
"kick",
]

# -- snip --
```

Then configure the lobby to your likings:

```toml
# -- snip --

[join.lobby]
# Lobby occupation method.
# The client joins a fake lobby server with an empty world, floating in space.
# A message is overlayed on screen to notify the server is starting.
# The client will be teleported to the real server once it is ready.
# This may keep the client occupied forever if no timeout is set.
# Consumes client, not allowing other join methods afterwards.

# !!! WARNING !!!
# This is highly experimental and unstable.
# This may break the game and crash clients.
# Don't enable this unless you know what you're doing.
#
# - Only works with offline mode
# - Only works with vanilla Minecraft clients, does not work with modded
# - Only tested with Minecraft 1.17.1

# Maximum time in seconds in the lobby while the server starts.
timeout = 600

# Message banner in lobby shown to client.
message = "§2Server is starting\n§7⌛ Please wait..."

# Sound effect to play when server is ready.
ready_sound = "block.note_block.chime"

# -- snip --

```

_Note: this might have changed, see the latest configuration
[here](../res/lazymc.toml)._
8 changes: 4 additions & 4 deletions res/lazymc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ command = "java -Xmx1G -Xms1G -jar server.jar --nogui"
[join]
# Methods to use to occupy a client on join while the server is starting.
# Read about all methods and configure them below.
# Methods are used in-order, if none is set, the client disconnects without a message.
# Methods are used in order, if none is set, the client disconnects without a message.
#methods = [
# "hold",
# "kick",
Expand Down Expand Up @@ -94,7 +94,7 @@ command = "java -Xmx1G -Xms1G -jar server.jar --nogui"
# Consumes client, not allowing other join methods afterwards.

# IP and port to forward to.
# Forwarded-to server will receive original client handshake and login request as received by lazymc.
# The target server will receive original client handshake and login request as received by lazymc.
#address = "127.0.0.1:25565"

[join.lobby]
Expand All @@ -106,15 +106,15 @@ command = "java -Xmx1G -Xms1G -jar server.jar --nogui"
# Consumes client, not allowing other join methods afterwards.

# !!! WARNING !!!
# This is highly experimental and unstable.
# This is highly experimental, incomplete and unstable.
# This may break the game and crash clients.
# Don't enable this unless you know what you're doing.
#
# - Only works with offline mode
# - Only works with vanilla Minecraft clients, does not work with modded
# - Only tested with Minecraft 1.17.1

# Maxiumum time in seconds in the lobby while the server starts.
# Maximum time in seconds in the lobby while the server starts.
#timeout = 600

# Message banner in lobby shown to client.
Expand Down
Binary file added res/screenshot/lobby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 73d0c86

Please sign in to comment.