add variable for minecraft location

This commit is contained in:
Expand-sys 2021-12-01 07:08:56 +11:00
parent 8e7a2f1901
commit 94a4af2dd8

View file

@ -2,7 +2,7 @@ const fs = require("fs");
const got = require("got"); const got = require("got");
const { spawn } = require("child_process"); const { spawn } = require("child_process");
let minecraftin; let minecraftloc = process.env.MINECRAFTLOC;
module.exports = { module.exports = {
name: "start", name: "start",
description: "start mc server", description: "start mc server",
@ -17,7 +17,7 @@ module.exports = {
function spawnMC(channel) { function spawnMC(channel) {
let options = { let options = {
shell: true, shell: true,
cwd: "/CCash/minecraft/", cwd: `${minecraftloc}`,
}; };
const minecraft = spawn( const minecraft = spawn(
"java", "java",