azalea-brigadier

Crates.ioazalea-brigadier
lib.rsazalea-brigadier
version0.13.0+mc1.21.5
created_at2022-09-05 15:07:45.631155+00
updated_at2025-06-16 00:24:06.161219+00
descriptionA port of Mojang's Brigadier command parsing and dispatching library.
homepage
repositoryhttps://github.com/azalea-rs/azalea
max_upload_size
id658897
size187,985
mat (mat-1)

documentation

README

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.

Commit count: 1506

cargo fmt