EssentialsX

EssentialsX

2M Downloads

Command cooldowns do not work when aliases are set in commands.yml

molor opened this issue ยท 5 comments

commented

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.

commented

Could you try adding a cooldown for the test alias?

commented

Oh, yeah, I forgot to write it. Tried. Nothing has changed.

commented

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?

commented

Can confirm
image

commented

Having the same issue, setting the alias /rtp for /tpr doesnt seem to trigger a cooldown configured in the essentials config