mc-rcon 0.1.1

A client implementation of Minecraft's RCON protocol
Documentation
  • Coverage
  • 100%
    18 out of 18 items documented2 out of 8 items with examples
  • Size
  • Source code size: 18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Aegrithas/mc-rcon-rs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Aegrithas

This is a Rust crate provides a client for Minecraft's RCON protocol as specified at https://wiki.vg/RCON.

Connect to a server with RconClient::connect, log in with RconClient::log_in, and then send your commands RconClient::send_command. For example:

let client = RconClient::connect("localhost:25575")?;
client.log_in("SuperSecurePassword")?;
println!("{}", client.send_command("seed")?);

This example connects to a server running on localhost, with RCON configured on port 25575 (or omitted, as that is the default port) and with password SuperSecurePassword, after which it uses Minecraft's seed command to query the world's generation seed.

Assuming that the server is configured accordingly, this program will print a response from the server like Seed: [-1137927873379713691].

For excessively long responses, RCON servers can send multiple response packets. This crate does handle this possibility, but as an implementation detail it will sometimes send extra seed commands.