@izhank216/minecraft-server
v1.1.1
Published
A library for making Minecraft servers in Node.js!
Readme
node-minecraft-server
A library for making Minecraft servers in Node.js!
Installation
npm install @izhank216/minecraft-server
or with yarn:
yarn add @izhank216/minecraft-serverNotice:
Not an official Minecraft product. This is not made by Mojang or Microsoft. Not approved by or associated with Mojang or *Microsoft.
Usage
import { createServer } from '@izhank216/minecraft-server';
const server = createServer({
host: '0.0.0.0', // optional, default: '0.0.0.0'
port: 25565, // optional, default: 25565
version: '1.20.2', // optional, default: '1.20.2'
motd: 'Welcome to My Server!', // optional, default: 'A Minecraft Server'
onlineMode: true // optional, default: false (cracked)
});Usage (CJS)
const { createServer } = require("@izhank216/minecraft-server");
const server = createServer({
host: '0.0.0.0', // optional, default: '0.0.0.0'
port: 25565, // optional, default: 25565
version: '1.20.2', // optional, default: '1.20.2'
motd: 'Welcome to My Server!', // optional, default: 'A Minecraft Server'
onlineMode: true // optional, default: false (cracked)
});Usage with plugins
import { createServer, Bukkit } from '@izhank216/minecraft-server';
const server = createServer({
host: '0.0.0.0',
port: 25565,
version: '1.20.2',
motd: 'Welcome to My Server!',
onlineMode: true
});
const bukkit = new Bukkit(server);
bukkit.loadSpigot('plugins/plugin1.js', 'plugins/plugin2.js');
bukkit.loadPaper('plugins/paper-plugin1.js');
bukkit.loadPurpur('plugins/purpur-plugin1.js');
bukkit.loadFolia('plugins/folia-plugin1.js');
// To disable all plugins at any time
// bukkit.disableAllPlugins();Usage with plugins (CJS)
const { createServer, Bukkit } = require('@izhank216/minecraft-server');
const server = createServer({
host: '0.0.0.0',
port: 25565,
version: '1.20.2',
motd: 'Welcome to My Server!',
onlineMode: true
});
const bukkit = new Bukkit(server);
bukkit.loadSpigot('plugins/plugin1.js', 'plugins/plugin2.js');
bukkit.loadPaper('plugins/paper-plugin1.js');
bukkit.loadPurpur('plugins/purpur-plugin1.js');
bukkit.loadFolia('plugins/folia-plugin1.js');
// To disable all plugins at any time
// bukkit.disableAllPlugins();License
MIT
