From a5e7ff771d657258cedcc7a8b3ce265c655f0860 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 30 May 2025 20:07:28 -0330 Subject: implement missing brigadier features and cleanup some more --- azalea-brigadier/src/tree/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'azalea-brigadier/src/tree') diff --git a/azalea-brigadier/src/tree/mod.rs b/azalea-brigadier/src/tree/mod.rs index 8181f817..bf53b4ff 100644 --- a/azalea-brigadier/src/tree/mod.rs +++ b/azalea-brigadier/src/tree/mod.rs @@ -14,13 +14,14 @@ use crate::{ required_argument_builder::Argument, }, context::{CommandContext, CommandContextBuilder, ParsedArgument, StringRange}, - exceptions::{BuiltInExceptions, CommandSyntaxException}, + errors::{BuiltInError, CommandSyntaxError}, modifier::RedirectModifier, string_reader::StringReader, suggestion::{Suggestions, SuggestionsBuilder}, }; -pub type Command = Option) -> i32 + Send + Sync>>; +pub type Command = + Option) -> Result + Send + Sync>>; /// An ArgumentBuilder that has been built. #[non_exhaustive] @@ -149,7 +150,7 @@ impl CommandNode { &self, reader: &mut StringReader, context_builder: &mut CommandContextBuilder, - ) -> Result<(), CommandSyntaxException> { + ) -> Result<(), CommandSyntaxError> { match self.value { ArgumentBuilderType::Argument(ref argument) => { let start = reader.cursor(); @@ -176,7 +177,7 @@ impl CommandNode { return Ok(()); } - Err(BuiltInExceptions::LiteralIncorrect { + Err(BuiltInError::LiteralIncorrect { expected: literal.value.clone(), } .create_with_context(reader)) -- cgit v1.2.3