Skip to content

Commit

Permalink
refactor: new test command handler
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Feb 19, 2022
1 parent 15d1752 commit c59d003
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import static net.minecraft.commands.Commands.literal;
import java.util.List;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.tree.CommandNode;
import org.auioc.mods.arnicalib.ArnicaLib;
import org.auioc.mods.arnicalib.server.command.impl.TestCommand;
import org.auioc.mods.arnicalib.server.command.impl.VersionCommand;
import net.minecraft.commands.CommandSourceStack;

Expand All @@ -15,9 +15,7 @@ public final class ServerCommandRegistry {

public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
NODE.addChild(literal("version").executes((ctx) -> VersionCommand.getModVersion(ctx, ArnicaLib.MAIN_VERSION, ArnicaLib.FULL_VERSION, ArnicaLib.MOD_NAME)).build());
NODE.addChild(literal("test").executes((ctx) -> {
return Command.SINGLE_SUCCESS;
}).build());
NODE.addChild(literal("test").executes(TestCommand::test).build());

getRootNode(dispatcher).addChild(NODE);
}
Expand Down

0 comments on commit c59d003

Please sign in to comment.