1 package com.irtimaled.bbor.client.commands;
3 import com.irtimaled.bbor.client.providers.CustomBeaconProvider;
4 import com.irtimaled.bbor.client.providers.CustomBoxProvider;
5 import com.mojang.brigadier.CommandDispatcher;
6 import com.mojang.brigadier.builder.LiteralArgumentBuilder;
7 import net.minecraft.command.Commands;
8 import net.minecraft.command.ISuggestionProvider;
10 public class CustomCommand {
11 private static final String COMMAND = "bbor:custom";
12 private static final String BOX = "box";
13 private static final String BEACON = "beacon";
15 public static void register(CommandDispatcher<ISuggestionProvider> commandDispatcher) {
16 LiteralArgumentBuilder command = Commands.literal(COMMAND)
17 .then(BoxCommandBuilder.build(BOX))
18 .then(BeaconCommandBuilder.build(BEACON))
19 .then(Commands.literal(ArgumentNames.CLEAR)
20 .executes(context -> {
21 CustomBoxProvider.clear();
22 CustomBeaconProvider.clear();
24 CommandHelper.feedback(context, "bbor.commands.box.cleared.all");
27 commandDispatcher.register(command);