EssentialsX

EssentialsX

2M Downloads

Regexs not working for Command Cooldowns

Bobcat00 opened this issue ยท 3 comments

commented

Information

Full output of /ess version:

Server version: 1.16.4-R0.1-SNAPSHOT git-Spigot-628435a-768d7fc (MC: 1.16.4)
EssentialsX version: 2.18.2.0
LuckPerms version: 5.2.35
Vault version: 1.7.3-b131
EssentialsXChat version: 2.18.2.0
EssentialsXGeoIP version: 2.18.2.0
EssentialsXSpawn version: 2.18.2.0

Server startup log:

[WARN] [Essentials] Command cooldown error: Unclosed group near index 14
^ban([^ip])?( 
[WARN] [Essentials] Command cooldown error: 'MemorySection[path='command-cooldowns.^^ban([^ip])?( ', root='EssentialsConf']' is not a valid cooldown
[WARN] [Essentials] Command cooldown error: Unclosed group near index 14
^ban([^ip])?( 
[WARN] [Essentials] Command cooldown error: 'MemorySection[path='command-cooldowns.^^ban([^ip])?( ', root='EssentialsConf']' is not a valid cooldown

EssentialsX config:

command-cooldowns:
  '^^ban([^ip])?( .*)?': 30

Details

Description:

EssentialsX produces multiple errors when attempting to use the example regex in the Command Cooldowns documentation at https://github.com/EssentialsX/Essentials/wiki/Command-Cooldowns . Any similar regex also results in errors. I can't get any regex ending with ( .)? to work.

Steps to reproduce:

Enter the regex from the documentation for highly technical users, as shown in the above config file excerpt.

Expected behavior:

I expected that EssentialsX would work with the regex given in the official EssentialsX documentation. (It's almost like nobody ever tested this.)

commented

Should be fixed in configurate when using quotes to encase the regex

commented

This is the case for all regular expressions that have a period in them. This is pending an implementation of #3200.

commented

My whole reason for going down the regex path was to have a unified cooldown for command aliases, which I see is being handled by #2058. So feel free to close this, or keep it open to keep track of the general regex bug and documentation.