Added Command and AbstractCommand
All checks were successful
Test and Deploy / build (17, ubuntu-latest) (push) Successful in 4m12s
Test and Deploy / deploy (17, ubuntu-latest) (push) Has been skipped

This commit is contained in:
Quentin Legot 2023-08-29 22:50:21 +02:00
parent 10edfe5ef6
commit 40768b2ec1
2 changed files with 24 additions and 0 deletions

View File

@ -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<ServerCommandSource> context;
protected AbstractCommand(CommandContext<ServerCommandSource> c) {
this.context = c;
this.source = c.getSource();
}
}

View File

@ -0,0 +1,9 @@
package fr.altarik.toolbox.core.command;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
public interface Command {
int run() throws CommandSyntaxException;
}