GUI Shop

GUI Shop

273k Downloads

Commands not declared in the plugin.yml file

DoctorSclero opened this issue · 4 comments

commented

The commands must be declared in the plugin.yml file or minecraft can't understand the command, please fix, thank's

commented
commented

GuiShop dynamically provides commands through the PlayerCommandPreProcessEvent. I say provides because the commands are not formally registered. However, such command logic is not without problems:

  • Server owners can't use the commands.yml to define aliases for dynamically-provided commands, because Spigot only recognises aliases which target formally-registered commands from plugin.yml's.
  • With normal commands, other plugins can use the PlayerCommandPreProcessEvent to cancel the event, allowing server owners to configure when and where players cannot use a plugin command. E.g., WorldGuard can block commands in a specific WG region. However, this can't be done with GuiShop's dynamically-provided commands.

@pablo67340 , would you consider adding subcommands to the main guishop command? E.g., /guishop alias buy and /guishop alias sell would be the same as /buy and /sell, provided /buy and sell are the buy-commands and sell-commands configured in the config.yml. Subcommands don't require any registration but they do solve the issues caused by omitting plugin.yml entries for the buy and sell commands.

commented

Fixed by #47 , this issue can be closed now.

commented

There's also an explicit declaration of /guishopuser in the plugin.yml as explained in #55 , in case you weren't satisfied with runtime command registration (although that should ensure command recognisation)