msmhq / msm

An init script for managing Minecraft servers
http://msmhq.com
GNU General Public License v3.0
1.22k stars 225 forks source link

Convert server txt files to json #404

Closed renderorange closed 3 years ago

renderorange commented 4 years ago

Minecraft server no longer uses server txt files. While it automagically converts from server txt files to json on startup, msm should create and manage the json files and not rely on Minecraft server to handle it.

Several places need to be updated to support this change. Updating the filenames in the confs and msm will support msm correctly creating the files.

The bigger change is reading and managing those json files in msm. When making changes, msm can not search/replace or echo into a file anymore, but needs to read and write the json structure. The jq commandline parser may be the best choice and easiest to use, but needs to be tested in the supported server operating systems to make sure it's available through the package manager.

renderorange commented 4 years ago

After a little digging, I misunderstood how at least op was handled with msm. I thought it was manually modifying the txt files, but turns out to be sending server commands, which means the ops.json file is correctly modified.

Still need to test how default ops are handled and modify that, but may not need jq on the server to modify json

renderorange commented 4 years ago

Side note, jq is already installed and used in msm for downloading jar files.