MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
479 stars 61 forks source link

Specifying different java versions per worlds #294

Closed nooklyn1 closed 3 years ago

nooklyn1 commented 3 years ago

Hello,

Could be me but it looks like minecraft 1.16.5 and minecraft 1.17 can't be run on the same java version. I ran a modded and vanilla server on 1.16.5 in the past without issue because these used the same java version. is there a way to specify for one of the servers which java version to use?

zanix commented 3 years ago

You can add mscs-server-command to the world's mscs.properties file.

The default for this setting is

mscs-server-command=$JAVA -Xms$INITIAL_MEMORY -Xmx$MAXIMUM_MEMORY $JVM_ARGS -jar $SERVER_LOCATION/$SERVER_JAR $SERVER_ARGS

Replace $JAVA with the path to the java runtime you need.

You can also alter this globally in /opt/mscs/mscs.defaults

mscs-default-server-command=$JAVA -Xms$INITIAL_MEMORY -Xmx$MAXIMUM_MEMORY $JVM_ARGS -jar $SERVER_LOCATION/$SERVER_JAR $SERVER_ARGS

These options and more are documented here: https://minecraftservercontrol.github.io/docs/mscs/adjusting-world-server-properties

nooklyn1 commented 3 years ago

Thanks!