A command-line RCON tool for Minecraft servers.
Maybe! Batchcraft lets you run most console commands through shell scripts or other programs that can't interact with Minecraft's RCON natively. This includes .bat
files or Command Prompt on Windows and .sh
files or your preferred shell/terminal on Linux.
Batchcraft is written in Go, and should run on most remotely-modern systems. If you wish to build Batchcraft from source, just have a working Go installation, clone this repository, and run go build
in the directory to get a binary that works for your system.
If you'd rather not compile it from source and you're running either Windows or Linux, just grab the pre-compiled binary for your server's operating system from the bin
directory in this repository.
If your operating system is 32-bit, use the binary located in the x86
subdirectory. If your operating system is 64-bit, use the binary located in the x64
subdirectory.
If you aren't sure what one to use, the 32-bit Windows binary will work on both 32-bit and 64-bit versions of Windows. For Linux, because most installations are 64-bit, try the 64-bit version first and if it doesn't let you run it, try the 32-bit version instead.
If you're running Batchcraft on a Raspberry Pi or other similar single-board computer, you'll most likely want the binary located in the linux/arm
subdirectory. At the time of writing, most single-board computers have either a 32-bit or 64-bit ARM processor, but use a 32-bit Linux-based operating system. If you knowingly installed a 64-bit one, use the binary from the linux/arm64
subdirectory instead.
If you're running Batchcraft on an ARM-based cloud server, such as AWS' EC2 A1, you'll probably want to use the binary located in linux/arm64
.
Because Batchcraft relies on Minecraft's RCON feature, that will need to be enabled before Batchcraft will function.
Easy way: Just have the correct Batchcraft binary for your operating system in the same directory as the shell script or program that will be using it.
Advanced way: Place the correct Batchcraft binary for your operating system in a directory that is available in your system's PATH environment variable. This will enable all your scripts and programs to use the same binary instead of needing a separate copy in any directory that contains something that uses it.
Once you have it "installed" with either method listed above, just use it like this:
batchcraft -a hostname:port -p password -c "command string"
Where "hostname:port" is your Minecraft server's RCON address and port (such as 127.0.0.1:25575
), "password" is your configured RCON password, and "command string" is the console command you wish to run. If your command contains spaces, you should put quotes around the command, like this: "whitelist add SomePlayer"
Batchcraft is licensed under the Apache License version 2.0.
This means you're free to use this code in your own projects, modify and redistribute changes to this code, and even sell products that make use of this code under the conditions that: The unmodified parts of this code are still licensed under this same license and that you don't claim the unmodified parts as your own.
You can find out more about what you can and can not do with this code in the full text of the license here: https://www.apache.org/licenses/LICENSE-2.0