Command cooldowns do not work when aliases are set in commands.yml
molor opened this issue ยท 5 comments
commands.yml (Server):
aliases:
test:
- 'essentials:me (testing)'
config.yml (Essentials):
command-cooldowns:
me: 20
If I run the "test" command three times at one second intervals (chat output):
[12:00:01] molor (testing)
[12:00:02] molor (testing)
[12:00:03] molor (testing)
If I do the same, but with "me":
[12:00:01] molor (testing)
[12:00:02] You cannot type that command for 19 second.
[12:00:03] You cannot type that command for 18 second.
Paper/Spigot 1.12.2; Essentials 2.15.0.16. I hope that clearly described the problem.
Cooldowns are handled in PlayerCommandPreprocessEvent
. My guess is that since the player isn't actually running the command (Spigot is running the command for the player), that event doesn't get fired for the command that is run by the alias, so the cooldown check never happens.
I'm not sure what the reason for the alias not being checked though - perhaps pluginCommand
is null
?