aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/context/command_context_builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-brigadier/src/context/command_context_builder.rs')
-rw-r--r--azalea-brigadier/src/context/command_context_builder.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/azalea-brigadier/src/context/command_context_builder.rs b/azalea-brigadier/src/context/command_context_builder.rs
index 88e26343..639a97ee 100644
--- a/azalea-brigadier/src/context/command_context_builder.rs
+++ b/azalea-brigadier/src/context/command_context_builder.rs
@@ -1,8 +1,10 @@
use std::collections::HashMap;
use crate::{
- arguments::argument_type::ArgumentType, command::Command,
- command_dispatcher::CommandDispatcher, redirect_modifier::RedirectModifier,
+ arguments::argument_type::{ArgumentType, Types},
+ command::Command,
+ command_dispatcher::CommandDispatcher,
+ redirect_modifier::RedirectModifier,
tree::command_node::CommandNode,
};
@@ -25,7 +27,10 @@ use super::{
// private boolean forks;
#[derive(Clone)]
-pub struct CommandContextBuilder<'a, S, T> {
+pub struct CommandContextBuilder<'a, S, T>
+where
+ T: ArgumentType<dyn Types>,
+{
arguments: HashMap<String, ParsedArgument<T>>,
root_node: &'a dyn CommandNode<S, T>,
nodes: Vec<ParsedCommandNode<S, T>>,
@@ -45,7 +50,10 @@ pub struct CommandContextBuilder<'a, S, T> {
// this.range = StringRange.at(start);
// }
-impl<S, T> CommandContextBuilder<'_, S, T> {
+impl<S, T> CommandContextBuilder<'_, S, T>
+where
+ T: ArgumentType<dyn Types>,
+{
pub fn new(
dispatcher: CommandDispatcher<S, T>,
source: S,