azalea-brigadier 0.14.0+mc1.21.8

A port of Mojang's Brigadier command parsing and dispatching library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::rc::Rc;

use crate::context::CommandContext;

pub trait ResultConsumer<S> {
    fn on_command_complete(&self, context: Rc<CommandContext<S>>, success: bool, result: i32);
}

pub struct DefaultResultConsumer;
impl<S> ResultConsumer<S> for DefaultResultConsumer {
    fn on_command_complete(&self, _context: Rc<CommandContext<S>>, _success: bool, _result: i32) {}
}