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
Conversation
…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.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.