https://github.com/seanpray/rcon-rs
barebones rcon implementation in rust for Minecraft
https://github.com/seanpray/rcon-rs
minecraft rcon-protocol
Last synced: 10 months ago
JSON representation
barebones rcon implementation in rust for Minecraft
- Host: GitHub
- URL: https://github.com/seanpray/rcon-rs
- Owner: seanpray
- License: gpl-3.0
- Created: 2022-02-20T20:32:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-31T19:36:18.000Z (about 4 years ago)
- Last Synced: 2025-03-29T02:52:20.328Z (about 1 year ago)
- Topics: minecraft, rcon-protocol
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Hyper barebones implementation of the RCON protocol for Minecraft.
To use this crate place this in your Cargo.toml file
```toml
[dependencies]
rcon-rs = "0.1.0"
```
##### Example usage:
```rust
// create new connect using ip and port
let mut conn = Client::new("127.0.0.1", "25575");
// you MUST auth the connection before attempting to use it
conn.auth("password")?;
// send any command you would like, the packet type is option and inferred to be a command by
// default
conn.send("say hi", Some(PacketType::Cmd))?;
```
A more complete example can be found [here](./examples/main.rs)
##### rcon protocol details
More info can be found here:
https://wiki.vg/RCON#Fragmentation
##### contributing
Any suggestions, improvements, or pull request are welcome. I am relatively new to rust so my quality of code is not great but I'm looking to improve!