mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
* start organizing packet_handling more by moving packet handlers into their own functions * finish writing all the handler functions for packets * use macro for generating match statement for packet handler functions * fix set_entity_data * update config state to also use handler functions * organize az-client file structure by moving things into plugins directory * fix merge issues |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
README.md |
Azalea Brigadier
A Rust port of Mojang's Brigadier command parsing and dispatching library.
Examples
use azalea_brigadier::prelude::*;
use std::sync::Arc;
#[derive(Debug, PartialEq)]
struct CommandSource {}
let mut subject = CommandDispatcher::new();
subject.register(literal("foo").executes(|_| 42));
assert_eq!(
subject
.execute("foo", Arc::new(CommandSource {}))
.unwrap(),
42
);
See the tests for more.