move Command Annotations

This commit is contained in:
tueem 2024-10-13 21:15:04 +02:00
parent 421fb230e9
commit 78e3a0ad51
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB
9 changed files with 60 additions and 32 deletions

@ -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;
}

@ -1,7 +0,0 @@
package net.tomatentum.marinara.command.annotation;
public @interface RootCommand {
public String name();
public String description() default "";
public CommandOption[] options() default {};
}

@ -1,7 +0,0 @@
package net.tomatentum.marinara.command.annotation;
public @interface SubCommand {
public String name();
public String description() default "";
public CommandOption[] options() default {};
}

@ -1,6 +0,0 @@
package net.tomatentum.marinara.command.annotation;
public @interface SubCommandGroup {
public String name();
public String description() default "";
}

@ -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;
}

@ -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 {};
}

@ -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 {};
}

@ -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 "";
}

@ -1,4 +1,4 @@
package net.tomatentum.marinara.command.option;
package net.tomatentum.marinara.interaction.commands.option;
public enum OptionType {
ATTACHMENT,