aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/arguments
diff options
context:
space:
mode:
authorUbuntu <github@matdoes.dev>2022-01-11 00:42:30 +0000
committerUbuntu <github@matdoes.dev>2022-01-11 00:42:30 +0000
commitcb4d871f6f56a484dc87151ea3ad55f7e3bbed97 (patch)
tree743377adb4103f3a0ecbec5788a71d3bf6c0a3d0 /azalea-brigadier/src/arguments
parentfec7a2bfedc562306523b9d3c51b97e376dc32d9 (diff)
downloadazalea-drasl-cb4d871f6f56a484dc87151ea3ad55f7e3bbed97.tar.xz
work a bit on brigadier
Diffstat (limited to 'azalea-brigadier/src/arguments')
-rw-r--r--azalea-brigadier/src/arguments/argument_type.rs26
-rw-r--r--azalea-brigadier/src/arguments/bool_argument_type.rs2
2 files changed, 22 insertions, 6 deletions
diff --git a/azalea-brigadier/src/arguments/argument_type.rs b/azalea-brigadier/src/arguments/argument_type.rs
index ea453a1a..f5ca457b 100644
--- a/azalea-brigadier/src/arguments/argument_type.rs
+++ b/azalea-brigadier/src/arguments/argument_type.rs
@@ -1,3 +1,4 @@
+use super::bool_argument_type::BoolArgumentType;
use crate::{
context::command_context::CommandContext,
exceptions::command_syntax_exception::CommandSyntaxException,
@@ -5,12 +6,27 @@ use crate::{
suggestion::{suggestions::Suggestions, suggestions_builder::SuggestionsBuilder},
};
-pub trait ArgumentResult {}
+pub enum DefaultArguments {
+ Bool(BoolArgumentType),
+}
+
+/*
+define_arguments! {
+ Entity(EntityArgumentType)
+}
+
+===
+
+enum CustomArguments {
+ Entity(EntityArgumentType)
+}
+enum BrigadierArguments {
+ BuiltIn(DefaultArguments)
+ Custom(CustomArguments)
+}
+*/
-pub trait ArgumentType<T>
-where
- T: ArgumentResult,
-{
+pub trait ArgumentType<T> {
// T parse(StringReader reader) throws CommandSyntaxException;
// default <S> CompletableFuture<Suggestions> listSuggestions(final CommandContext<S> context, final SuggestionsBuilder builder) {
diff --git a/azalea-brigadier/src/arguments/bool_argument_type.rs b/azalea-brigadier/src/arguments/bool_argument_type.rs
index 74df3331..9bdf42e5 100644
--- a/azalea-brigadier/src/arguments/bool_argument_type.rs
+++ b/azalea-brigadier/src/arguments/bool_argument_type.rs
@@ -2,7 +2,7 @@ use crate::context::command_context::CommandContext;
use super::argument_type::ArgumentType;
-struct BoolArgumentType {}
+pub struct BoolArgumentType {}
impl ArgumentType<bool> for BoolArgumentType {}