garrettjoecox / scriptserver

A Minecraft server wrapper, allows for simple plugins in vanilla
GNU General Public License v3.0
68 stars 10 forks source link

Error on startup #25

Closed Buggitt closed 6 years ago

Buggitt commented 6 years ago

Sat down to play with this today but can't seem to get the core to start. Using the basic example and get this error:

$ node ServerScript.js
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn java ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
Dylankjy commented 6 years ago

Please provide your source code as it would probably be easier & faster for one to help you with this.

Buggitt commented 6 years ago

All I’m trying to do is use the example code.

const ScriptServer = require('scriptserver');

const server = new ScriptServer({
  core: {
    jar: 'minecraft_server.jar',
    args: ['-Xmx2G'],
    rcon: {
      port: '25575',
      password: 'password'
    }
  }
});

server.start();

Which is in my “ServerScript.js” which I’m running.

ImBaedin commented 6 years ago

And you have the server jar in the same directory as your server?

Buggitt commented 6 years ago

@ImBaedin Yep, they are in the same directory. I downloaded a vanilla 1.12.2 server jar and started it on its own (to generate the Eula file and server.properties) added the necessary lines to the server properties. And standalone the Minecraft server runs fine.

Buggitt commented 6 years ago

Booted up my computer today and it seems to work fine now. I know I had to install java so might have needed a reboot in order for this to work correctly.