diff --git a/common/src/main/java/dev/xhyrom/lighteco/common/command/abstraction/Command.java b/common/src/main/java/dev/xhyrom/lighteco/common/command/abstraction/Command.java new file mode 100644 index 0000000..fb35254 --- /dev/null +++ b/common/src/main/java/dev/xhyrom/lighteco/common/command/abstraction/Command.java @@ -0,0 +1,28 @@ +package dev.xhyrom.lighteco.common.command.abstraction; + +import dev.xhyrom.lighteco.common.command.argument.Argument; +import lombok.Getter; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.List; + +public abstract class Command { + @Getter + @NonNull + private final String name; + + @Getter + @Nullable + private final String permission; + + @Getter + @NonNull + private final List args; + + public Command(@NonNull String name, @Nullable String permission, @NonNull Argument... args) { + this.name = name; + this.permission = permission; + this.args = List.of(args); + } +} diff --git a/common/src/main/java/dev/xhyrom/lighteco/common/command/argument/Argument.java b/common/src/main/java/dev/xhyrom/lighteco/common/command/argument/Argument.java new file mode 100644 index 0000000..a04859b --- /dev/null +++ b/common/src/main/java/dev/xhyrom/lighteco/common/command/argument/Argument.java @@ -0,0 +1,19 @@ +package dev.xhyrom.lighteco.common.command.argument; + +import lombok.Getter; +import net.kyori.adventure.text.Component; + +public class Argument { + @Getter + private final String name; + @Getter + private final boolean required; + @Getter + private final Component description; + + public Argument(String name, boolean required, Component description) { + this.name = name; + this.required = required; + this.description = description; + } +}