A configurable Minecraft server wrapper written in Node.js. Using a combination of RCON and the output of the server console it allows you to do some pretty cool things, like making simple server-side plugins on a vanilla Minecraft server JAR.
Technically, it can work with any version of Minecraft that logs to STDOUT and has an RCON port exposed (Which dates back to ~2012 in Vanilla). Where problems usually arise from version to version is logging format changes, but it mostly just requires fiddling with the RegExp set up in the indiviual plugins.
Prerequisites
- NodeJS
- Somewhat of a familiarity with JavaScript/TypeScript
- Minecraft server JAR (Vanilla / Spigot / Etc)
Setup
- Create a folder for your server and drop in the downloaded server.jar
- Within the folder run
npm init
with the default options and thennpm i @scriptserver/core @scriptserver/essentials
- Create a file named
server.js
with the following content
const { ScriptServer } = require('@scriptserver/core');
const { useEssentials } = require('@scriptserver/essentials');
const server = new ScriptServer({
javaServer: {
path: '.',
jar: 'server.jar',
args: ['-Xmx1024M', '-Xms1024M'],
},
rconConnection: {
port: 25575,
password: 'password',
},
});
useEssentials(server);
server.start();
- Start your server with
node server.js
- Close the node process, agree to the
eula.txt
and withinserver.properties
make the following changes (they need to match whatever is specified in the config above):
enable-rcon=true
rcon.port=25575
rcon.password=password
broadcast-rcon-to-ops=false
- Start your server again with
node server.js
- Fin! You should now be set up with the essentials plugin
Official
- Core - ScriptServer, JavaServer & RconConnection APIs
- Event - Parses events like login/logout/chat/achievement
- Util - Helper methods usually involvivng commands within Minecraft like /tellraw
- Command - Module for registering custom commands that can be activated with chat messages (e.g.
~home
) - Json - Simple module for storing and reading data in JSON files
- Essentials - Combines all of the plugins above to provide things like warps, homes, kits, MOTD, etc.
Community
Submit a ticket to get yours added!
- Clone this repo
- Globally install lerna with
npm i -g lerna
- Run
lerna bootstrap
to link all packages - Run
lerna run build
to build all packages - Profit?