13 releases (breaking)

new 0.10.3+mc1.21.1 Oct 23, 2024
0.10.2 Jun 14, 2024
0.10.0 Apr 24, 2024
0.9.0 Dec 5, 2023
0.4.0 Nov 19, 2022

#4 in #azalea

Download history 63/week @ 2024-07-01 11/week @ 2024-07-08 67/week @ 2024-07-29 1/week @ 2024-08-05 1/week @ 2024-08-19 4/week @ 2024-08-26 9/week @ 2024-09-16 40/week @ 2024-09-23 29/week @ 2024-09-30 3/week @ 2024-10-07 6/week @ 2024-10-14

78 downloads per month
Used in 3 crates (2 directly)

MIT license

115KB
3K SLoC

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.

Dependencies

~0.4–5.5MB
~21K SLoC