1.0.0 • Published 4 years ago

mcdata-to-json v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

mcdata-to-json

npm version Build Status semantic-release

Node.js binary to create JSON from stats, playerdata, advancements, logs and chunks. See explanation of steps it takes to do this here.

Usage

CLI is available from npmjs.org. So you can simply do this:

npx mcdata-to-json --minecraftdir=/opt/minecraft

Look for an output folder with the generated JSON (unless it fails to run, and you will see warnings/errors if that's the case.)

CLI Options

OptionDefault ValueDescription
--loglevelwarnSpecify log verbosity, one of error, warn, info, debug or silly
-v, --verboseMore 'v's increase log verbosity (up to -vvv or --verbose --verbose --verbose)
-q, --quietDecrease log verbosity (changes from warn to error)
-t, --minecraftdir/minecraftSpecify the minecraft directory (containing the server.properites)
-o, --outputdir./outputSpecify output directory for generated JSON
-w, --workdir./mcdata_cacheSpecify a temporary directory that can be used while running
-v, --versionShow version and exit
-h, --helpShow help message and exit

Environment Variables

You can define environment variables in lieu of using option switches. The prefix MCTOJSON_ is needed before the defined switch (see full listing in mcdata-to-json --help). If you create a file .env in the root where you run mcdata-to-json, it will be used to populate the environment variables.

Common Variables

VariableDetails
MCTOJSON_LOGLEVELSet the log level, choose one of: error, warn, info, debug, silly
MCTOJSON_MINECRAFTDIRSet the location of your minecraft folder
MCTOJSON_OUTPUTDIRSet the output folder for generated JSON

Generated Files

See the docs for more information.

Development

Use pnpm for dependency management when developing the project. If you don't have it, install it with either npm install --global pnpm or yarn global add pnpm then you can clone this repository and do pnpm install in the root and install dependencies.

1.0.0

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago