From bbb0d1d79f70fbfca377d1f2c4f558d35096a851 Mon Sep 17 00:00:00 2001 From: Squibid Date: Mon, 3 Jun 2024 18:28:47 -0400 Subject: init --- src/main/java/los/numeros/command/TestCommand.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/los/numeros/command/TestCommand.java (limited to 'src/main/java/los/numeros/command') 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 dispatcher, boolean dedicated) + { + dispatcher.register(CommandManager.literal("test") + .then(CommandManager.literal("foo").executes(TestCommand::run))); + } + + public static int + run(CommandContext ctx) throws CommandSyntaxException + { + System.out.println("printing something"); + return 0; + } +} -- cgit v1.2.1