Base lobby
BaseLobby is the minimal data class every per-instance lobby extends. It holds the lobby id, the host UUID, the player set, the staging center block, the list of staging blocks (for tear-down), and the ScreenPlacement for the lobby’s wall-mounted info panel. Game-specific state (settings, ready flags, vote counts) lives in your subclass.
When to use it
Section titled “When to use it”- You’re writing a custom lobby class for a minigame and need the standard shape.
- You’re reading lobby state in a phase handler and want the inherited fields.
- You’re integrating with
LobbyEnginewhich expects this shape.
package me.zlex.conduit.lobby;
public abstract class BaseLobby { public final UUID id; public final UUID hostId; public final Set<UUID> players; // LinkedHashSet — insertion-ordered public BlockPos stagingCenter; public final List<BlockPos> stagingBlocks; // populated by LobbyStagingBuilder public ScreenPlacement screenPlacement;
public BaseLobby(UUID id, UUID hostId);
public boolean isHost(UUID id);}The host is automatically added to players in the constructor.
Example
Section titled “Example”import me.zlex.conduit.lobby.BaseLobby;import me.zlex.conduit.world.WorldSettings;
import java.util.UUID;
public final class MyLobby extends BaseLobby {
public WorldSettings appliedSettings = WorldSettings.defaults(); public WorldSettings pendingSettings = appliedSettings; public int roundCount = 3;
public MyLobby(UUID id, UUID hostId) { super(id, hostId); }
public boolean settingsDirty() { return !appliedSettings.equals(pendingSettings); }}playersis aLinkedHashSet— iteration order matches insertion order, useful when rendering rosters.- The host is the only player guaranteed present at construction. Others join via
LobbyEngine.join. screenPlacementis null until you (or the lobby builder) compute it — typically right after building the staging box.