JorelAli / CommandAPI

A Bukkit/Spigot API for the command UI introduced in Minecraft 1.13

Home Page:https://commandapi.jorel.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make ignore-case-sensitive command?

lastsurvivors opened this issue · comments

Description

How to make ignore-case-sensitive command?
i'm using CommandAPI 9.3.0 on 1.20.4

Expected code

No response

Extra details

new CommandAPICommand("hello")
.executesPlayer((sender, args) -> {
sender.damage(20);
}).register();

/hello (working)
/HELLO (not-working)

Generally, you don't because Brigadier only lets you execute commands that actually exist in the dispatcher.
But, using the withAliases method, you can add aliases that also can be used to execute the command.

I think I am going to close this issue now. If you've got any further questions, feel free to join the discord server if you haven't already or open another issue if you run into any issues.