Valheim DevCommandsGuard
Server-configurable guard to reject clients with -console or devcommands, and highlights non-admin players using debugmode or god mode in red.Valheim_DevCommandsGuard
Valheim BepInEx plugin for Thunderstore.
Features
- Server-side Connection Guard (
BepInEx/config/com.valheim.devcommandsguard.cfg):RejectClientsWithDevCommands(trueby default): Rejects non-admin clients launched with-consoleor withdevcommandsactive. Server admins (adminlist.txt) are never rejected.RejectClientsWithoutPlugin(trueby default): Rejects non-admin clients connecting withoutValheim_DevCommandsGuardinstalled.
- Guarded Commands (
[Guards]section — alltrueby default):GuardConsoleArg(-consolelaunch argument)GuardDevCommands(devcommandstoggle)GuardGod(godmode)GuardDebugMode(debugmode)GuardFly(flymode / debug fly keybind)GuardSpawn(spawncommand)GuardTp(tp/gotocommand)
- Configurable Highlight & Red Tag Visibility (
[Visibility]section):HighlightVisibility(Adminby default): Controls who sees the 3D red character highlight (All,Admin,Disabled).TagVisibility(Allby default): Controls who sees the red tag on overhead player names and in game chat messages (All,Admin,Disabled).TagFormat("[DEV] {name}"by default) andTagColor("red"by default).
- Server Console & Game Chat Event Logging (
[ChatLogs]section):- Every guarded event (
-consolejoin, or any user/admin enabling, disabling, or executingdevcommands,god,debugmode,fly,spawn,tp) is logged to the Server Console and broadcast to Game Chat. - Each command's Game Chat log visibility is independently configurable (
All,Admin,Disabled; all default toAdmin):ChatLogConsoleArg,ChatLogDevCommands,ChatLogGod,ChatLogDebugMode,ChatLogFly,ChatLogSpawn,ChatLogTp.
- Every guarded event (
- Runtime Admin Console Command (
dcg):- Server admins can view or update settings in real time from the in-game F5 console; changes are persisted to
com.valheim.devcommandsguard.cfgand broadcast to connected clients:dcg status— Print current configuration.dcg reject <on|off>— Enable/disable rejecting non-admin clients with-console/devcommands(immediately checks and disconnects violating active non-admin connections when enabled).dcg requireplugin <on|off>— Enable/disable rejecting non-admin clients missing the plugin.dcg highlight <all|admin|disabled>— Set 3D red model highlight visibility.dcg tagvis <all|admin|disabled>— Set overhead and chat red tag visibility.dcg guard <all|console|devcommands|god|debugmode|fly|spawn|tp> <on|off>— Enable or disable guarding for a command.dcg log <all|console|devcommands|god|debugmode|fly|spawn|tp> <all|admin|disabled>— Set game chat log visibility for a guarded command.dcg tagcolor <color>— Update and broadcast the tag color.dcg tagformat <format>— Update and broadcast the tag format (e.g.,dcg tagformat [CHEATER] {name}).
- Server admins can view or update settings in real time from the in-game F5 console; changes are persisted to
Building & Packaging for Thunderstore
- Build the project with .NET SDK (
net48):dotnet build -c Release - Copy
bin/Release/net48/Valheim_DevCommandsGuard.dllintoThunderstore/plugins/. - Ensure
256x256icon.pngis inThunderstore/. - Zip the contents of
Thunderstore/(manifest.json,README.md,icon.png,plugins/Valheim_DevCommandsGuard.dll).
