spigen
Programmatically manage Spigot server instances, in Node.
Install
npm i spigen
Purpose
Spigen is designed for use by (generally) large dynamic Minecraft networks.
Start a server
const Spigen = const generator = 'spigot.jar' const serverInstance = generator
Custom Spigot start parameters
All Spigot start parameters can be used as options in generator.createServer(options)
.
For example:
generator
serverInstance
Utilizing Spigot instances are created using generators with the generator.createServer
method.
For example:
const generator = 'spigot.jar' const serverInstance = generator
Methods
serverInstance.stop
Requests server stop with /stop
command.
serverInstance.execute(String command)
Executes a command on the server.
Properties
serverInstance.process
Internal Spigot child process.
Events
error
(error)
It is recommended that this event be handled. This occurs when the child process experiences a fatal error.
err
(error)
This is emitted when output to stderr is recieved from the Spigot instance.
log
(message)
This is emitted when Spigot instances output to stdout.
close
(code)
This is emitted when Spigot ends.
done
Emitted when Spigot has fully started.