May not be possible but thought I’d ask.
I have a script starting my minecraft server with this command
java -jar minecraft_server.jar
No memory settings or anything else are passed in. Is it possible to declare the port the server should run on at this level?
IE
java -jar minecraft_server.jar -p MINECRAFT_PORT
If this is not possible, then what about this. In the server.properties file, the post var is declared. Is there any way to point it at a ENV variable? Namely MINECRAFT_PORT?
Thanks to any who know this one.
P.s This one is more technical than gaming related so thats why its here and not in Arqade. Its nothing to do with the actual game and more to do with environment variables and server configuration.
All the evidence I’ve seen points to the answer – No you can’t do that.
MINECRAFT_PORT) into the properties … unless the Minecraft code is doing this explicitly. (And if it was, you would expect that that the documentation would mention this.)Reading between the lines, I’m guessing that you are trying to run multiple servers using a properties file that is “almost the same” across all instances. You could achieve pretty much the same thing by creating a “template” property file containing all of the shared property settings and placeholders for the non-shared values. Then use a simple preprocessor to expand the placeholders for each of the variant.
Or just use different properties files and keep them in step by hand.