22 lines
852 B
Java
22 lines
852 B
Java
package cc.reconnected.server.commands;
|
|
|
|
import cc.reconnected.server.RccServer;
|
|
import com.mojang.brigadier.CommandDispatcher;
|
|
import net.minecraft.command.CommandRegistryAccess;
|
|
import net.minecraft.server.command.CommandManager;
|
|
import net.minecraft.server.command.ServerCommandSource;
|
|
import net.minecraft.text.Text;
|
|
|
|
import static net.minecraft.server.command.CommandManager.literal;
|
|
|
|
public class RccCommand {
|
|
public static void register(CommandDispatcher<ServerCommandSource> dispatcher, CommandRegistryAccess registryAccess, CommandManager.RegistrationEnvironment environment) {
|
|
dispatcher.register(
|
|
literal("rcc")
|
|
.requires(source -> source.hasPermissionLevel(2))
|
|
.executes(ctx -> {
|
|
return 1;
|
|
})
|
|
);
|
|
}
|
|
}
|