diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/CommandOption.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/CommandOption.java deleted file mode 100644 index 94dc890..0000000 --- a/lib/src/main/java/net/tomatentum/marinara/command/annotation/CommandOption.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.tomatentum.marinara.command.annotation; - -import net.tomatentum.marinara.command.option.OptionType; - -public @interface CommandOption { - public String name(); - public String description() default ""; - public OptionType type() default OptionType.STRING; - public boolean required() default false; - -} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java deleted file mode 100644 index eb1e53c..0000000 --- a/lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java +++ /dev/null @@ -1,7 +0,0 @@ -package net.tomatentum.marinara.command.annotation; - -public @interface RootCommand { - public String name(); - public String description() default ""; - public CommandOption[] options() default {}; -} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java deleted file mode 100644 index 198b7b5..0000000 --- a/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java +++ /dev/null @@ -1,7 +0,0 @@ -package net.tomatentum.marinara.command.annotation; - -public @interface SubCommand { - public String name(); - public String description() default ""; - public CommandOption[] options() default {}; -} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java deleted file mode 100644 index 93d9a7d..0000000 --- a/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java +++ /dev/null @@ -1,6 +0,0 @@ -package net.tomatentum.marinara.command.annotation; - -public @interface SubCommandGroup { - public String name(); - public String description() default ""; -} diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/CommandOption.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/CommandOption.java new file mode 100644 index 0000000..b76a9bc --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/CommandOption.java @@ -0,0 +1,17 @@ +package net.tomatentum.marinara.interaction.commands.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import net.tomatentum.marinara.interaction.commands.option.OptionType; + +@Target({ElementType.ANNOTATION_TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface CommandOption { + public String name(); + public String description() default ""; + public OptionType type() default OptionType.STRING; + public boolean required() default false; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/RootCommand.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/RootCommand.java new file mode 100644 index 0000000..4ed4e2e --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/RootCommand.java @@ -0,0 +1,15 @@ +package net.tomatentum.marinara.interaction.commands.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface RootCommand { + public String name(); + public String description() default ""; + public String[] aliases() default {}; + public CommandOption[] options() default {}; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/SubCommand.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/SubCommand.java new file mode 100644 index 0000000..004f5cd --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/SubCommand.java @@ -0,0 +1,14 @@ +package net.tomatentum.marinara.interaction.commands.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface SubCommand { + public String name(); + public String description() default ""; + public CommandOption[] options() default {}; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/SubCommandGroup.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/SubCommandGroup.java new file mode 100644 index 0000000..e96dbcb --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/annotation/SubCommandGroup.java @@ -0,0 +1,13 @@ +package net.tomatentum.marinara.interaction.commands.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface SubCommandGroup { + public String name(); + public String description() default ""; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/option/OptionType.java similarity index 75% rename from lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java rename to lib/src/main/java/net/tomatentum/marinara/interaction/commands/option/OptionType.java index 00140cf..64d0207 100644 --- a/lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/option/OptionType.java @@ -1,4 +1,4 @@ -package net.tomatentum.marinara.command.option; +package net.tomatentum.marinara.interaction.commands.option; public enum OptionType { ATTACHMENT,