Added Command and AbstractCommand
This commit is contained in:
parent
10edfe5ef6
commit
40768b2ec1
@ -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