minecraft-client-rs
A client for the Minecraft RCON protocol.
Library Usage
// Create a new client and connect to the server.
let mut client = new.unwrap;
// Send some commands.
match client.authenticate
match client.send_command
// Disconnect cleanly when finished.
client.close.unwrap;
Shell Utility
If you are looking for a tool rather than a library, try the shell command:
# Single command mode
# Interactive mode
> list
> seed
Limitations
Response bodies over 4KB will be truncated.
Starting a server for testing
$ docker pull itzg/minecraft-server
$ docker run --name=minecraft-server -p 25575:25575 -d -e EULA=TRUE itzg/minecraft-server
Running Tests
To run unit tests:
$ cargo test --lib
To run integration tests after starting the test server in Docker:
$ cargo test