Add additional command /trg runcmd
wysohn opened this issue ยท 3 comments
Third Party Plugins are unable to use custom commands from command triggers.
Add /trg runcmd <command trigger>
so that other plugins can run Command Trigger directly through the dispatchCommand() method
Refer to #253
@wysohn
are you sure this will be necessary if we just do #253
I know that thread has turned into discussions about tab completion, but at the start, we agreed on a config option to register commands.
The title of that issue is wrong.
If the commands are registered, third party plugins won't have a problem using them.
@wysohn
I noticed you commented that there's no clean way to register the commands without NMS, but that's not true. We just have to use reflection to modify Bukkit's command map.
Registering the commands will be a much better solution too. Unregistered commands flash red in chat until you run them. /trg runcmd
only solves half of the problem. Third party tools can run it, but it isn't friendly to players. They can't tab complete unregistered commands, they won't know if they misspelled it, and they will suspect that the server is badly configured.
MidnightSugar wasn't the first person to suggest it either. Registering commands is a standard feature of many plugins that allow custom commands, like myCommand. Don't make an excuse for not implementing it because we will have to use reflection. We know it can work.
If we get the command registration to work, there will be no point in making /trg runcmd. We need to try that first.
@gerzytet
Right, I forgot that the command has to be registered first in order to use tab-complete.
This task is not necessary so will be closed.