1.20.2 #26
@ -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();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package fr.altarik.toolbox.core.command;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
|
||||
public interface Command {
|
||||
|
||||
int run() throws CommandSyntaxException;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user