EssentialsX

EssentialsX

2M Downloads

regex for command cooldown not functioning entirely

mrcoffee1026 opened this issue ยท 1 comments

commented

Information

Full output of /ess version:

[17:18:27 INFO]: Server version: 1.16.3-R0.1-SNAPSHOT git-Paper-247 (MC: 1.16.3)
[17:18:27 INFO]: EssentialsX version: 2.18.1.24
[17:18:27 INFO]: PlaceholderAPI version: 2.10.9
[17:18:27 INFO]: LuckPerms version: 5.1.93
[17:18:27 INFO]: Vault version: 1.7.3-b131
[17:18:27 INFO]: EssentialsXProtect version: 2.18.1.24
[17:18:27 INFO]: EssentialsXGeoIP version: 2.18.1.24
[17:18:27 INFO]: EssentialsXAntiBuild version: 2.18.1.24
[17:18:27 INFO]: EssentialsXSpawn version: 2.18.1.24
[17:18:27 INFO]: CMI version: 8.7.9.3
[17:18:27 INFO]: ChestShop version: 3.10-SNAPSHOT (build 164)

Server startup log:
Nothing relevant to display for this.

EssentialsX config:
Relevant portion:

command-cooldowns:
#  feed: 100 # 100 second cooldown on /feed command
#  '*': 5 # 5 Second cooldown on all commands
  '^(fix|repair)(\sall|\shand)?': 43200

Help request

Problem:

This used to function as you would expect it to, but apparently no longer does in versions of Minecraft above 1.15. I've gone back as far into the archive of the build server that there is available and every build has the same behavior in 1.16.3: Cooldown is properly applied to the naked commands /fix and /repair if and only if they are entered entirely by themselves, if any arguments are used within the command ("/fix all", "/repair hand" or any variation of those), the cooldown is completely bypassed.

What I have tried:

I've tried variations on the regex, but it just doesn't seem possible to perform more than a single match (once /fix is found, it looks no further... since there IS an actual further in the player's entered command, it's not a match anymore). Example setting in documentation: '^ban([^ip])( .*)?': 60 # 60 seconds /ban cooldown. -- should also not be possible to actually match since it requires a second match term as well (the ip address)... harder to test that though since anyone who has ban permission likely has cooldown bypass permission as well.

Console stack trace:


Screenshots:

commented

Closing in favour of #3847, which has been confirmed and discussed.