diff options
Diffstat (limited to 'src/main/java/los/numeros/command/TestCommand.java')
-rw-r--r-- | src/main/java/los/numeros/command/TestCommand.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/los/numeros/command/TestCommand.java b/src/main/java/los/numeros/command/TestCommand.java new file mode 100644 index 0000000..874ee79 --- /dev/null +++ b/src/main/java/los/numeros/command/TestCommand.java @@ -0,0 +1,25 @@ +package los.numeros.command; + +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.context.CommandContext; +import com.mojang.brigadier.exceptions.CommandSyntaxException; + +import net.minecraft.server.command.CommandManager; +import net.minecraft.server.command.ServerCommandSource; + +public class TestCommand { + + public static void + register(CommandDispatcher<ServerCommandSource> dispatcher, boolean dedicated) + { + dispatcher.register(CommandManager.literal("test") + .then(CommandManager.literal("foo").executes(TestCommand::run))); + } + + public static int + run(CommandContext<ServerCommandSource> ctx) throws CommandSyntaxException + { + System.out.println("printing something"); + return 0; + } +} |