aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/builder
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-brigadier/src/builder')
-rw-r--r--azalea-brigadier/src/builder/argument_builder.rs1
-rw-r--r--azalea-brigadier/src/builder/required_argument_builder.rs7
2 files changed, 5 insertions, 3 deletions
diff --git a/azalea-brigadier/src/builder/argument_builder.rs b/azalea-brigadier/src/builder/argument_builder.rs
index 1fb775c2..17e9d625 100644
--- a/azalea-brigadier/src/builder/argument_builder.rs
+++ b/azalea-brigadier/src/builder/argument_builder.rs
@@ -67,7 +67,6 @@ impl<S: Any + Clone> ArgumentBuilder<S> {
}
pub fn build(self) -> CommandNode<S> {
- println!("building {:?}", self);
CommandNode {
value: self.value,
diff --git a/azalea-brigadier/src/builder/required_argument_builder.rs b/azalea-brigadier/src/builder/required_argument_builder.rs
index 95f4da01..9cd089de 100644
--- a/azalea-brigadier/src/builder/required_argument_builder.rs
+++ b/azalea-brigadier/src/builder/required_argument_builder.rs
@@ -1,5 +1,8 @@
use super::argument_builder::{ArgumentBuilder, ArgumentBuilderType};
-use crate::{parsers::Parser, string_reader::StringReader};
+use crate::{
+ exceptions::command_syntax_exception::CommandSyntaxException, parsers::Parser,
+ string_reader::StringReader,
+};
use std::{any::Any, fmt::Debug, rc::Rc};
/// An argument node type. The `T` type parameter is the type of the argument,
@@ -17,7 +20,7 @@ impl Argument {
}
}
- pub fn parse(&self, reader: &mut StringReader) -> Option<Rc<dyn Any>> {
+ pub fn parse(&self, reader: &mut StringReader) -> Result<Rc<dyn Any>, CommandSyntaxException> {
self.parser.parse(reader)
}
}