#Custom Command Manager

1 messages · Page 1 of 1 (latest)

thick moon
#

Custom Command Manager (CCM) for Minecraft Bedrock.

✔ Alias support (.alias("shortcmd"))
✔ Typed parameters like .player(), .item(), .enum(), bool()
✔ Custom permission levels ("Admin", "Host", etc.)
✔ No more privilege errors – safe callback execution
✔ Fine-grained access control via .requires(origin => ...)

Register command metadata like this:

Command.register("ban")
  .alias("block")
  .describe("Bans a player")
  .player("target", true)
  .requires(origin => origin.sourceType === CustomCommandSource.Entity && origin.sourceEntity.hasTag('ADMIN'))

And then register the callback like this:

Command.run('ban', (origin, targets: Player[]) => {
    for (const target of targets){
        target.addTag('banned')
    }
})

Repository: https://github.com/Aex66/ccm
Made by Aex66.

GitHub

Contribute to Aex66/ccm development by creating an account on GitHub.

unkempt bridge
#

this is amazing! but is there a way to remove the ccm: prefix from the commands?

thick moon
#

Just gotta wait for the stable release

#

I mean, the commands still have to be registered with a namespace, but in-game there will be a copy of the command without the namespace.

#

Also, you can change the namespace with Command._prefix("whatever") (You need to do it before the registration of the commands)