promotional bannermobile promotional banner

Client Commands

Client Commands is a tiny utility for other mods to add client side only commands with Auto Completion

Client Commands is a utility/library mod for other mods to use.
It reintroduces client side only commands to Minecraft (Forge).
This mod doesn't add anything on its own.

The prefix for client side commands is !

 

How to for Modders:
Commands can be registered 2 way, either by sending your commands over with the IMC system,
or by requesting to get the CommandDispatcher over IMC.
The latter is easier to use if you've got multiple commands.

You can just create your commands the same way as you would for normal Commands.
However, both the world and server of the CommandSource will be null!
Here's an example of the IMC system, the event is registered on the Mod Bus:

private static void enqueueIMC(InterModEnqueueEvent event){
    //Registering single commands expects a 'LiteralArgumentBuilder<?>'
    InterModComms.sendTo("clientcommands", "register_command", () -> /* command instance */);


    //Registering commands using a callback expects a 'Consumer<CommandDispatcher<CommandSource>>'
    InterModComms.sendTo("clientcommands", "register_commands", () -> this::registerCommands);

}

 

private static void registerCommands(CommandDispatcher<CommandSource> commandDispatcher){
    //register your commands to the dispatcher
}

 

Feedback as well as Questions can be posted in our Discord

The Discord Logo with a Join Us banner right next to it

The Client Commands Team

profile avatar
Owner
  • 29
    Followers
  • 16
    Projects
  • 45.6M
    Downloads

The friendly neighborhood modder. Head and only member of Brazier Modding.

Donate

More from JTK222View all

  • Global Packs project image

    Global Packs

    • 37.2M
    • Mods

    A small helper mod for Modpacks, adding a global Datapack.

    • 37.2M
    • March 26, 2026
    • Mods
    • +2
  • Critter Barriers project image

    Critter Barriers

    • 4.9K
    • Mods

    Rope and chain curtains that block small critters from going trough them.

    • 4.9K
    • November 15, 2025
    • Mods
    • +3
  • Just Utilities project image

    Just Utilities

    • 169.7K
    • Mods

    A personal use Multiloader Library

    • 169.7K
    • December 8, 2024
    • Mods
    • +1
  • Creepy Decor project image

    Creepy Decor

    • 144.6K
    • Mods

    Adds decoration themed around Halloween/Autumn and everything spooky

    • 144.6K
    • November 12, 2024
    • Mods
    • +1
  • Global Packs project image

    Global Packs

    • 37.2M
    • Mods

    A small helper mod for Modpacks, adding a global Datapack.

    • 37.2M
    • March 26, 2026
    • Mods
    • +2
  • Critter Barriers project image

    Critter Barriers

    • 4.9K
    • Mods

    Rope and chain curtains that block small critters from going trough them.

    • 4.9K
    • November 15, 2025
    • Mods
    • +3
  • Just Utilities project image

    Just Utilities

    • 169.7K
    • Mods

    A personal use Multiloader Library

    • 169.7K
    • December 8, 2024
    • Mods
    • +1
  • Creepy Decor project image

    Creepy Decor

    • 144.6K
    • Mods

    Adds decoration themed around Halloween/Autumn and everything spooky

    • 144.6K
    • November 12, 2024
    • Mods
    • +1