mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-02-25 21:53:52 -05:00
using os.tmpdir() instead of '/tmp' since it's more portable
This commit is contained in:
parent
b44e052f28
commit
137320489c
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
const mc = require('../');
|
||||
const os = require('os');
|
||||
const Server = mc.Server;
|
||||
const path = require('path');
|
||||
const assert = require('power-assert');
|
||||
|
@ -19,7 +20,7 @@ mc.supportedVersions.forEach(function(supportedVersion,i) {
|
|||
const PORT=Math.round(30000+Math.random()*20000);
|
||||
const mcData = require("minecraft-data")(supportedVersion);
|
||||
const version = mcData.version;
|
||||
const MC_SERVER_JAR_DIR = process.env.MC_SERVER_JAR_DIR || '/tmp';
|
||||
const MC_SERVER_JAR_DIR = process.env.MC_SERVER_JAR_DIR || os.tmpdir();
|
||||
const MC_SERVER_JAR = MC_SERVER_JAR_DIR + "/minecraft_server." + version.minecraftVersion + ".jar";
|
||||
const wrap = new Wrap(MC_SERVER_JAR, MC_SERVER_PATH+"_"+supportedVersion);
|
||||
wrap.on('line', function(line) {
|
||||
|
|
Loading…
Reference in a new issue