azalea/azalea-brigadier
mat 2f51a0a123 Release 0.10.0
azalea@0.10.0
azalea-auth@0.10.0
azalea-block@0.10.0
azalea-block-macros@0.10.0
azalea-brigadier@0.10.0
azalea-buf@0.10.0
azalea-buf-macros@0.10.0
azalea-chat@0.10.0
azalea-client@0.10.0
azalea-core@0.10.0
azalea-crypto@0.10.0
azalea-entity@0.10.0
azalea-inventory@0.10.0
azalea-inventory-macros@0.10.0
azalea-language@0.10.0
azalea-physics@0.10.0
azalea-protocol@0.10.0
azalea-protocol-macros@0.10.0
azalea-registry@0.10.0
azalea-registry-macros@0.10.0
azalea-world@0.10.0

Generated by cargo-workspaces
2024-04-23 23:56:30 -05:00
..
src clippy 2024-04-20 04:03:03 +00:00
tests brigadier suggestions 2023-10-12 22:01:15 -05:00
Cargo.toml Release 0.10.0 2024-04-23 23:56:30 -05:00
README.md update repo links 2023-10-08 03:58:57 -05:00

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.