mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-15 03:14:56 -05:00
checks if server jar exists
This commit is contained in:
parent
4f3973db11
commit
8886cc5344
1 changed files with 6 additions and 1 deletions
|
@ -250,6 +250,11 @@ describe("client", function() {
|
||||||
batch.end(function(err) {
|
batch.end(function(err) {
|
||||||
if (err) return done(err);
|
if (err) return done(err);
|
||||||
//console.log(MC_SERVER_JAR);
|
//console.log(MC_SERVER_JAR);
|
||||||
|
if (!fs.existsSync(MC_SERVER_JAR)) {
|
||||||
|
console.log("The file "+MC_SERVER_JAR+" doesn't exist.");
|
||||||
|
return done(new Error("The file "+MC_SERVER_JAR+" doesn't exist."));
|
||||||
|
}
|
||||||
|
|
||||||
mcServer = spawn('java', [ '-Dlog4j.configurationFile=server/server_debug.xml', '-jar', MC_SERVER_JAR, 'nogui'], {
|
mcServer = spawn('java', [ '-Dlog4j.configurationFile=server/server_debug.xml', '-jar', MC_SERVER_JAR, 'nogui'], {
|
||||||
stdio: 'pipe',
|
stdio: 'pipe',
|
||||||
cwd: MC_SERVER_PATH,
|
cwd: MC_SERVER_PATH,
|
||||||
|
|
Loading…
Reference in a new issue