I'm trying to make an alias plugin that basically has a reload command that unregisters all the aliases, and registers the new aliases. I have a working code, but its a bit buggy. Like if I create new aliases then reload, the tab doesn't autocomplete but the new commands still work. And if I delete old commands then reload the commands still autocomplete and they still work even though I removed them from config.yml. Here is my code currently: https://github.com/codergautam/FastAliases/tree/37a0ba95c708776232315212b9e584df278a4f94
The code that reloads the command is in ReloadCommand.java in commands folder The code that unregisters all commands is in UnregisterAll.java in alias folder The code that loads the config/registers commands is in Configloader.java in the alias folder
Is there a way to fix this? and what am i doing wrong
thanks
I had to use the PlayerCommandSendEvent
to remove suggestions when it was sent to the player.