A server side fabric mod to enable command history, auto completion and syntax highlighting on the server console. Should have zero impact on the gameplay.
Note: Since Minecraft 1.17 the -Dlog4j.skipJansi=false
command line argument is needed for %style
/%highlight
log output (syntax highlighting is unaffected).
This mod is configured via jline4mcdsrv.toml
in the config
folder:
logPattern
is the pattern used for Log4j 2 (documentation found here)highlightColors
is a list of colors used to highlight parameters in order (as seen in the image above)
This is my first mod for Minecraft. Actually this is also the first time for me to do anything serious using Java. So please be gentle if you want to roast my code.
The mod can be downloaded for Minecraft 1.16 onwards on CurseForge and Modrinth
Debugging/running with IntelliJ
- Fork and setup like any other Minecraft mod
- Run Server configuration, accept EULA, ensure it runs successfully
- Create debug.bat (or .sh)
- paste the first line from the Server run log (the one that expands to oblivion when clicked ("C:...")) into there, append new line
pause
if you want to see crashes
If the line is less than a thousand characters, something is wrong => Edit Configurations...
-> Shorten command line:
none
and rerun
Edit Configurations...
/Add New Configuration
/Remote JVM Debug
->Transport=Shared Memory
,Address=localhost:25555
(not tested other values, but address should be filled), Use module classpath=main.- Copy Command line arguments for remote JVM and paste into the beginning of debug.bat replacing existing agentlib config
- Don't forget to add
-Dlog4j.skipJansi=false
to script and save it
- Build
- Run debug.bat
- Start debugger
- Debug
- Close (cmd) manually
Each time launching Minecraft Server
configuration changes the first line a bit, so you might need to update stuff after agentlib config in the script.
- Definetely update after adding new files