All Projects → node-link → minecord

node-link / minecord

Licence: MIT License
Connects Minecraft Server and Discord without any mods or plugins.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to minecord

Krypton
A fast, lightweight Minecraft server written in Kotlin
Stars: ✭ 178 (+217.86%)
Mutual labels:  minecraft-server
MineiaGo
Minecraft Bedrock Edition <-> Java Edition using BungeeCord.
Stars: ✭ 14 (-75%)
Mutual labels:  minecraft-server
ScriptableMC-Engine
Create TypeScript/JavaScript plugins for Minecraft 1.16 Bukkit/Spigot/Paper
Stars: ✭ 36 (-35.71%)
Mutual labels:  minecraft-server
Lantern
An open-source Minecraft server that implements the SpongeAPI.
Stars: ✭ 111 (+98.21%)
Mutual labels:  minecraft-server
pluGET
📦 Powerful Package manager which updates plugins & server software for minecraft servers
Stars: ✭ 87 (+55.36%)
Mutual labels:  minecraft-server
NanoLimbo
The lightweight, high performance Minecraft limbo server
Stars: ✭ 94 (+67.86%)
Mutual labels:  minecraft-server
minecraft-server-hibernation
Autostart and stop minecraft-server when players join/leave
Stars: ✭ 172 (+207.14%)
Mutual labels:  minecraft-server
mc-monitor
Monitor the status of Minecraft servers and provides Prometheus exporter and Influx line protocol output
Stars: ✭ 100 (+78.57%)
Mutual labels:  minecraft-server
AdminCraft
🌲 Admin Web GUI Server Wrapper for Vanilla Minecraft Servers
Stars: ✭ 30 (-46.43%)
Mutual labels:  minecraft-server
Minecraft-Server-Status
✅一个用于显示服务器在线信息及其他内容的网站
Stars: ✭ 22 (-60.71%)
Mutual labels:  minecraft-server
Purpur
Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
Stars: ✭ 1,224 (+2085.71%)
Mutual labels:  minecraft-server
wrapper.py
Wrapper.py is a Minecraft server wrapper that adds additional features to a vanilla server, including backups, dashboard access, plugins, and more.
Stars: ✭ 34 (-39.29%)
Mutual labels:  minecraft-server
Mc2Discord
A simple minecraft mod, server side only, to link the chat with your Discord server
Stars: ✭ 18 (-67.86%)
Mutual labels:  minecraft-server
VanillaReimplementation
[Paused - Far from done] Reimplementation of Vanilla features in Minestom
Stars: ✭ 67 (+19.64%)
Mutual labels:  minecraft-server
Node-MineiaGo
A proxy to bridge Bedrock (Minecraft Pocket Edition, Minecraft Console Editions and Windows 10 Edition) with Minecraft Java Edition.
Stars: ✭ 15 (-73.21%)
Mutual labels:  minecraft-server
minecraft
A Minecraft server implementation in Elixir.
Stars: ✭ 25 (-55.36%)
Mutual labels:  minecraft-server
minecraft-backup
Backup script for Minecraft servers on Linux. Supports screen, tmux, and RCON connections. Supports tar and restic backup format.
Stars: ✭ 140 (+150%)
Mutual labels:  minecraft-server
minecraft-server
Minecraft server with cool features running in Docker containers
Stars: ✭ 13 (-76.79%)
Mutual labels:  minecraft-server
Docker-Minecraft-PaperMC-Server
Starts a Minecraft PaperMC 1.18 server
Stars: ✭ 80 (+42.86%)
Mutual labels:  minecraft-server
paperweight-test-plugin
test plugin for paperweight-userdev
Stars: ✭ 34 (-39.29%)
Mutual labels:  minecraft-server

Minecord

Software License npm npm

Connects Minecraft Server and Discord without any mods or plugins.

Minecord

Installation

npm install -g minecord

Usage

In your Minecraft server.properties, make sure you have and restart the server.

enable-rcon=true
rcon.password=[minecraftRconPassword]
rcon.port=[minecraftRconPort]

Create a bot of Discord from here and get bot token.

Then let the created Bot participate in a specific channel from the OAuth 2 URL Generator.

Set up the config.json file.

{
  "pluginsDir": null,
  "enable": [
    "chat",
    "login",
    "death",
    "whitelist",
    "server"
  ],
  "disable": [],
  "minecraftLog": "/var/minecraft/logs/latest.log",
  "minecraftRconHost": "localhost",
  "minecraftRconPort": 25575,
  "minecraftRconPassword": "password",
  "discordBotToken": "bot_token",
  "discordChannel": "channel_id"
}

In order to acquire the channel ID, enable developer mode in your Discord client, then right click channel and select "Copy ID".

And run Minecord.

minecord --config /path/to/config.json

Alternatively, the setting can be given as an option.

minecord --help

  Usage: minecord [options]

  Options:

    -V, --version                         output the version number
    -c, --config <file>                   set configuration file
    -p, --plugins-dir <dir>               set local plugins directory
    --enable <plugins>                    enable plugin by name, "--enable PLUGIN1,PLUGIN2" for multiple plugins
    --disable <plugins>                   disable plugin by name, "--disable PLUGIN1,PLUGIN2" for multiple plugins
    --minecraft-log <path>                set the path to Minecraft log (It is recommended to specify them collectively in the configuration file)
    --minecraft-rcon-host <host>          set the Minecraft Server rcon host (It is recommended to specify them collectively in the configuration file)
    --minecraft-rcon-port <port>          set the Minecraft Server rcon port (It is recommended to specify them collectively in the configuration file)
    --minecraft-rcon-password <password>  set the Minecraft Server rcon password (It is recommended to specify them collectively in the configuration file)
    --discord-bot-token <token>           set Discord bot token (It is recommended to specify them collectively in the configuration file)
    --discord-channel <id>                set Discord channel ID for for the discord bot (It is recommended to specify them collectively in the configuration file)
    -h, --help                            output usage information

If you are an administrator of the channel of Discord, you can use it more conveniently by unifying Discord's nickname and Minecraft's username.

Plugins

By default, the following plugins are included.

  • chat : Sharing messages entered by users with Minecraft and Discord on their respective screens. (Default: enable)
  • login : Transfer login notification in Minecraft to Discord. (Default: disable)
  • death : Transfer the dead player notification in Minecraft to Discord. (Default: disable)
  • whitelist : Transfer whitelist operation notification in Minecraft to Discord. (Default: disable)
  • server : Transfer notification of start and stop of Minecraft server to Discord. (Default: disable)

How to make a plugin

To load the local plugin, please put the plugin in the directory specified by the --plugins-dir option and specify it in the configuration file.

When publishing the global plugin, please publish it as minecord-plugin-[PLUGIN].

export default Plugin => new Plugin({
  discord ({message, channel, user, sendToDiscord, sendToMinecraft}) {
    // Processing when receiving a message from Discord.
  },
  minecraft ({log, time, causedAt, level, message, channel, user, sendToDiscord, sendToMinecraft}) {
    // Processing when receiving a message from Minecraft.
  }
})

discord() method

It is executed when a message is received from the Discord channel.

Argument message is Message object of discord.js.

Argument channel is TextChannel object of discord.js.

Argument user is User object of discord.js.

Argument sendToDiscord is send function of discord.js.

Argument sendToMinecraft is send function of node-modern-rcon.

minecraft() method

It is executed when new Minecraft log is detected.

Argument log is one Minecraft log line.

Argument time, causedAt, level and message is the value obtained by parsing the Minecraft log.

For example, it becomes as follows.

[01:23:45] [Server thread/INFO]: player joined the game
export default Plugin => new Plugin({
  minecraft ({log, time, causedAt, level, message, channel, user, sendToDiscord, sendToMinecraft}) {
    console.log(log === '[01:23:45] [Server thread/INFO]: player joined the game')
    console.log(time === '01:23:45')
    console.log(causedAt === 'Server thread')
    console.log(level === 'INFO')
    console.log(message === 'player joined the game')
    // All true
  }
})

Argument channel is TextChannel object of discord.js.

Argument user is User object of discord.js.

Argument sendToDiscord is send function of discord.js.

Argument sendToMinecraft is send function of node-modern-rcon.

Author

@n0f

Follow

Contribution

I would be delighted if you rewrite README.md in native English!!

Of course, I would be delighted if you point out any problems or improvements related to the program.

Or, I would appreciate it if you increase the number of plugins included by default.

https://github.com/node-link/minecord/issues

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].