This package has been deprecated

Author message:

Package no longer supported. Contact support@npmjs.com for more info.

spigen

1.0.1 • Public • Published

spigen

Programmatically manage Spigot server instances, in Node.

GitHub | NPM

Install

npm i spigen

Purpose

Spigen is designed for use by (generally) large dynamic Minecraft networks.

Start a server

const Spigen = require('spigen')
 
const generator = new Spigen('spigot.jar')
 
const serverInstance = generator.createServer({
    'host': 'localhost',
    'port': 25565,
    'eula': true,
    'maxPlayers': 100
})

Custom Spigot start parameters

All Spigot start parameters can be used as options in generator.createServer(options).

For example:

generator.createServer({
    '--level-name': 'mainWorld'
})

Utilizing serverInstance

Spigot instances are created using generators with the generator.createServer method.

For example:

const generator = new Spigen('spigot.jar')
 
const serverInstance = generator.createServer()

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.

Package Sidebar

Install

npm i spigen

Weekly Downloads

0

Version

1.0.1

License

SEE LICENSE IN LICENSE.md

Unpacked Size

5.94 kB

Total Files

6

Last publish

Collaborators

  • npm