Skip to content

feat: dedicated server command addition and enhancement for some parity with java/bedrock, console prettification(?), you can FINALLY have a proper server seed, tools for moderation.#1101

Open
mattsumi wants to merge 4 commits intosmartcmd:mainfrom
mattsumi:dedserver

Conversation

@mattsumi
Copy link
Contributor

@mattsumi mattsumi commented Mar 10, 2026

Description

the dedicated server had a subpar console that would spam the user with useless information (for most), no commands, no op/ban system, and no way to manage the server at runtime. seed was regenerated every launch.

Changes:

see fix implementation

Previous Behavior

servers were loaded from a plaintext servers.txt file that users had to manually create and edit with a specific line-based format (ip, port, name repeating). there was no way to add servers from within the game.

Root Cause

the codebase was built for console platforms. there are no good moderation tools nor proper commands.

New Behavior

the server now has an interactive console with ansi colors, tab completion, and command history. 20+ commands are available (help, list, kick, ban, op, deop, tp, give, gamemode, time, weather, kill, say, summon, setblock, fill, effect, clear, enchant, vanish, stop, save-all (save-all is a stub atm. there is something fundamentally different to how the client saves worlds locally.)). op/ban lists persist to disk. seed is saved to server.properties after first generation. if an owner really needs to see the previous logspam (which i hated) they can use "-v" as a launch option to see absolutely everything.

Fix Implementation

ServerConsole.cpp/h: interactive cli with ansi colored output, tab completion, command history
ServerCommands.cpp/h: command registry and 20+ command handlers with op-only gating and paginated help
MinecraftServer.cpp/h: random seed generation, seed persistence via setStringAndSave
Settings.cpp/h: added setStringAndSave method
PendingConnection.cpp: name-based ban check on player login
Windows64_Minecraft.cpp: server console integration and -v flag
TexturePackRepository.cpp: rid the world of texture log spam behind verbose flag
Consoles_App.cpp: server startup integration
WinsockNetLayer.cpp/h: network layer adjustment
ClientSources.cmake: added new source files (tee hee i hate vs)

AI Use Disclosure

No AI was used for this PR.

3UR and others added 4 commits March 10, 2026 06:46
…ty with java/bedrock, console prettification(?), you can FINALLY have a proper server seed, tools for moderation.
…ty with java/bedrock, console prettification(?), you can FINALLY have a proper server seed, tools for moderation.
@codeHusky
Copy link
Collaborator

This seems like it’ll be somewhat of a duplicate alongside the #498 PR so not sure if we should merge this here rn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants