2025-06-11 17:11:11 -05:00
|
|
|
import * as Mindcraft from '../mindcraft/mindcraft.js';
|
|
|
|
import settings from '../../settings.js';
|
|
|
|
import yargs from 'yargs';
|
|
|
|
import { hideBin } from 'yargs/helpers';
|
|
|
|
|
|
|
|
function parseArguments() {
|
|
|
|
return yargs(hideBin(process.argv))
|
|
|
|
.option('mindserver_port', {
|
|
|
|
type: 'number',
|
|
|
|
describe: 'Mindserver port',
|
|
|
|
default: settings.mindserver_port
|
|
|
|
})
|
|
|
|
.help()
|
|
|
|
.alias('help', 'h')
|
|
|
|
.parse();
|
|
|
|
}
|
|
|
|
|
|
|
|
const args = parseArguments();
|
|
|
|
|
|
|
|
settings.mindserver_port = args.mindserver_port;
|
|
|
|
|
2025-06-13 13:02:48 -05:00
|
|
|
Mindcraft.init(settings.mindserver_port);
|
2025-06-11 17:11:11 -05:00
|
|
|
|
2025-06-13 13:02:48 -05:00
|
|
|
console.log(`Mindcraft initialized with MindServer at localhost:${settings.mindserver_port}`);
|