1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
azalea/azalea-brigadier
mat abc7b43b8c Release 0.10.3+mc1.21.1
azalea@0.10.3+mc1.21.1
azalea-auth@0.10.3+mc1.21.1
azalea-block@0.10.3+mc1.21.1
azalea-block-macros@0.10.3+mc1.21.1
azalea-brigadier@0.10.3+mc1.21.1
azalea-buf@0.10.3+mc1.21.1
azalea-buf-macros@0.10.3+mc1.21.1
azalea-chat@0.10.3+mc1.21.1
azalea-client@0.10.3+mc1.21.1
azalea-core@0.10.3+mc1.21.1
azalea-crypto@0.10.3+mc1.21.1
azalea-entity@0.10.3+mc1.21.1
azalea-inventory@0.10.3+mc1.21.1
azalea-inventory-macros@0.10.3+mc1.21.1
azalea-language@0.10.3+mc1.21.1
azalea-physics@0.10.3+mc1.21.1
azalea-protocol@0.10.3+mc1.21.1
azalea-protocol-macros@0.10.3+mc1.21.1
azalea-registry@0.10.3+mc1.21.1
azalea-registry-macros@0.10.3+mc1.21.1
azalea-world@0.10.3+mc1.21.1

Generated by cargo-workspaces
2024-10-22 23:05:04 -05:00
..
src resolve clippy warning 2024-05-23 02:12:34 +00:00
tests Add a brigadier example for use inside a bevy App (#146) 2024-05-09 21:55:55 -05:00
Cargo.toml Release 0.10.3+mc1.21.1 2024-10-22 23:05:04 -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.