在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):darcros/node-minecraft-proxy开源软件地址(OpenSource Url):https://github.com/darcros/node-minecraft-proxy开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):node-minecraft-proxySimple Minecraft proxy written in Node.js using the node-minecraft-protocol library Features
Installation
ExamplesSee also Creating a proxyThis example shows how to create a new proxy and how to the options are passed. const McProxy = require('minecraft-proxy');
let localServerOptions = {
'port': '25578',
'version': '1.12.1',
'online-mode': false,
'motd': 'nodejs minecraft proxy'
}
let serverList = {
hub: {
host: 'localhost',
port: 25565,
isDefault: true,
isFallback: true
},
minigames: {
host: 'localhost',
port: 25566
}
}
// if you leave proxyOptions empty yo may as well not pass it in the arguments, I wrote it anyway to point out that it exist
let proxyOptions = {}
/*
Use the "/server <serverName>" command in chat to move between servers.
<serverName> is the name that you chose for the server inside the serverList
This command is implemented by /src/Plugins/ChatCommands.js and it can be disabled by setting enablePlugin: false inside proxyOptions
*/
let proxy = McProxy.createProxy(localServerOptions, serverList, proxyOptions);
proxy.on('error', console.error);
proxy.on('listening', () => {
console.info('Listening!');
}); Moving players from a server to anotherIn this example every player will be moved from the proxy.on('login', (player) => {
setTimeout(() => {
proxy.setRemoteServer(player.id, "minigames");
}, 30 * 1000);
}); DocumentationSee the wiki. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论