All Projects → Cldfire → mc-server-wrapper

Cldfire / mc-server-wrapper

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
Lightweight Minecraft server wrapper binary for Discord chat bridge + enhanced management tools

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to mc-server-wrapper

Islands
A spigot plugin for creating customisable home islands with different biomes. https://www.spigotmc.org/resources/islands-home-islands-system.84303/
Stars: ✭ 18 (+5.88%)
Mutual labels:  spigot, minecraft-server
Mohist
Minecraft Forge Hybrid server implementing the Paper/Spigot/Bukkit API, formerly known as Thermos/Cauldron/MCPC+
Stars: ✭ 489 (+2776.47%)
Mutual labels:  spigot, minecraft-server
Crucible
Crucible is a Thermos fork containing various patches for bug fixes and performance improvements. Join our discord to stay updated with the project development.
Stars: ✭ 67 (+294.12%)
Mutual labels:  spigot, paperspigot
pluGET
📦 Powerful Package manager which updates plugins & server software for minecraft servers
Stars: ✭ 87 (+411.76%)
Mutual labels:  spigot, minecraft-server
Gate
A high performant & paralleled Minecraft proxy server with scalability, flexibility & excellent server version support - ready for the cloud!
Stars: ✭ 102 (+500%)
Mutual labels:  spigot, minecraft-server
ClayTech
An addon for slimefun.
Stars: ✭ 15 (-11.76%)
Mutual labels:  spigot, paperspigot
Purpur
Purpur is a fork of Paper, Tuinity, and Airplane with the goal of providing new and interesting configuration options, which allow for creating a unique gameplay experience not seen anywhere else
Stars: ✭ 286 (+1582.35%)
Mutual labels:  spigot, minecraft-server
MCAntiMalware
Anti-Malware for minecraft
Stars: ✭ 182 (+970.59%)
Mutual labels:  spigot, minecraft-server
Glowstone
A fast, customizable and compatible open source server for Minecraft: Java Edition
Stars: ✭ 1,364 (+7923.53%)
Mutual labels:  spigot, minecraft-server
Shopchest
ShopChest - Spigot/Bukkit Plugin
Stars: ✭ 38 (+123.53%)
Mutual labels:  spigot, minecraft-server
Mohist
Minecraft Forge Hybrid server implementing the Spigot/Bukkit API, formerly known as Thermos/Cauldron/MCPC+
Stars: ✭ 861 (+4964.71%)
Mutual labels:  spigot, minecraft-server
Cloudnet V3
CloudNet v3 is the next generation of Minecraft Java and Bedrock cloud systems
Stars: ✭ 124 (+629.41%)
Mutual labels:  spigot, 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 (+7100%)
Mutual labels:  spigot, minecraft-server
ManaDrop
A Gradle plugin for Minecraft development
Stars: ✭ 20 (+17.65%)
Mutual labels:  spigot, paperspigot
McRPG
An RPG plugin for Minecraft 1.13
Stars: ✭ 32 (+88.24%)
Mutual labels:  spigot, minecraft-server
Arclight
A Bukkit(1.15/1.16) server implementation on Forge using Mixin. ⚡
Stars: ✭ 262 (+1441.18%)
Mutual labels:  spigot, minecraft-server
Mirai
Mirai 未来 - A powerful Minecraft Server Software coming from the future
Stars: ✭ 325 (+1811.76%)
Mutual labels:  spigot, minecraft-server
EliteMobs
This is a spigot plugin that aims to extend Minecraft's survival endgame by making mobs more interesting.
Stars: ✭ 114 (+570.59%)
Mutual labels:  spigot, minecraft-server
Essentials
The essential plugin suite for Minecraft servers.
Stars: ✭ 957 (+5529.41%)
Mutual labels:  spigot, minecraft-server
Magicplugin
A Bukkit plugin for spells, wands and other magic
Stars: ✭ 110 (+547.06%)
Mutual labels:  spigot, minecraft-server

mc-server-wrapper

CI dependency status

Lightweight Rust program to manage a Java Minecraft server process (vanilla, Spigot, or PaperSpigot), providing niceties such as a Discord chat bridge, server restart-on-crash, and improved console output.

This has been running over top of a small server of mine 24/7 since March 2020 with zero crashes / major issues of any kind. I'd consider it ready for small-scale production usage.

Features

  • Runs on Linux, macOS, and Windows
  • Optionally enabled bi-directional Discord chat bridge (see Discord Bridge Setup)
    • Commands (prefixed by !mc):
      • list: replies with a list of people playing Minecraft
    • Embeds, mentions, and attachments in Discord messages are neatly formatted in Minecraft
    • Bot status message displays server info (such as the names of online players)
  • Run server with configurable memory allocation
    • Also allows passing custom JVM flags if desired
  • Restart server on crash
  • Auto-agree to EULA
  • Improved console output formatting

Installation

Downloading

You can download prebuilt binaries in the releases section.

Building

You can also build and install from source (requires an up-to-date Rust install):

cargo install --git https://github.com/Cldfire/mc-server-wrapper.git --locked

Usage

Generate a default config (customize the config path with the -c flag if desired):

mc-server-wrapper -g

Edit the config as required, explanation of options below. You can then start the server with the following (if you used the -c flag above use it again here):

mc-server-wrapper

Run mc-server-wrapper --help for some CLI args to quickly override the config with.

Config

[minecraft]
# The path to the server jar
server_path = "./server.jar"
# The memory in megabytes to allocate for the server
memory = 1024
# If you would like to pass custom flags to the JVM you can do so here
jvm_flags = "-XX:MaxGCPauseMillis=200"

# The Discord section is optional
[discord]
# Enable or disable the Discord bridge
enable_bridge = true
# The Discord bot token
token = "..."
# The Discord channel ID to bridge to
channel_id = 123
# Enable or disable bot status message updates
update_status = true

# Valid log levels: error, warn, info, debug, trace
#
# Logging levels set here only affect file logging
[logging]
# The log level for general mc-server-wrapper dependencies
all = "Warn"
# The log level for mc-server-wrapper
self = "Debug"
# The log level for Discord-related dependencies
discord = "Info"

Discord bridge setup

  • Register an application and a bot with Discord
  • Enable some things in the Privileged Gateway Intents section of the bot's admin portal
    • Toggle Server Members Intent on
      • This is used to receive member updates from your guild (such as when someone changes their nickname so we can change the name we display in-game)
    • Toggle Message Content Intent on
      • This is used to receive messsage content from the channel for the chat bridge in Discord so we can relay chat there into Minecraft
  • Add the bot to the guild you want to bridge to
  • Get the ID of the channel you want to bridge to (Google this for instructions)
  • Provide the bot token and channel ID in the config file
  • Enable the Discord bridge in the config file or with the -b flag

Future plans

  • Simple web and CLI interface to administrate server
    • Change most common settings
    • View online players
    • Chat from the web
    • Different levels of accounts (user, admin)
  • further ideas here

Library

The binary for this project is built on top of a library; if you want to implement a different feature set than the one I've chosen to, or implement the features in a different way, you can easily do so. See the mc-server-wrapper-lib README and its basic example for more.

cargo run --example basic -- path/to/server.jar

Screenshot

Early screenshot, subject to change:

demo screenshot showing off the TUI

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
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].