diff --git a/Core/src/main/java/fr/altarik/toolbox/core/command/AbstractCommand.java b/Core/src/main/java/fr/altarik/toolbox/core/command/AbstractCommand.java new file mode 100644 index 0000000..6ee5fc9 --- /dev/null +++ b/Core/src/main/java/fr/altarik/toolbox/core/command/AbstractCommand.java @@ -0,0 +1,15 @@ +package fr.altarik.toolbox.core.command; + +import com.mojang.brigadier.context.CommandContext; +import net.minecraft.server.command.ServerCommandSource; + +public abstract class AbstractCommand implements Command { + + protected final ServerCommandSource source; + protected final CommandContext context; + + protected AbstractCommand(CommandContext c) { + this.context = c; + this.source = c.getSource(); + } +} diff --git a/Core/src/main/java/fr/altarik/toolbox/core/command/Command.java b/Core/src/main/java/fr/altarik/toolbox/core/command/Command.java new file mode 100644 index 0000000..978cc79 --- /dev/null +++ b/Core/src/main/java/fr/altarik/toolbox/core/command/Command.java @@ -0,0 +1,9 @@ +package fr.altarik.toolbox.core.command; + +import com.mojang.brigadier.exceptions.CommandSyntaxException; + +public interface Command { + + int run() throws CommandSyntaxException; + +}