aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/result_consumer.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-30 20:07:28 -0330
committermat <git@matdoes.dev>2025-05-30 16:37:40 -0700
commita5e7ff771d657258cedcc7a8b3ce265c655f0860 (patch)
treeea5fdbbee32c1b9917a7ece03f6a1a70ee8e63fa /azalea-brigadier/src/result_consumer.rs
parentda73b4316de4b26322c53f14222c7751a0be55a1 (diff)
downloadazalea-drasl-a5e7ff771d657258cedcc7a8b3ce265c655f0860.tar.xz
implement missing brigadier features and cleanup some more
Diffstat (limited to 'azalea-brigadier/src/result_consumer.rs')
-rw-r--r--azalea-brigadier/src/result_consumer.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/azalea-brigadier/src/result_consumer.rs b/azalea-brigadier/src/result_consumer.rs
new file mode 100644
index 00000000..fb9dd135
--- /dev/null
+++ b/azalea-brigadier/src/result_consumer.rs
@@ -0,0 +1,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) {}
+}