EssentialsX

EssentialsX

2M Downloads

Command cooldown regexs issue

DebuffPvP opened this issue ยท 2 comments

commented

Problem
So i am trying to add a cooldown for /repair hand but the repair one won't include the hand in the command cooldowns section and i don't know what regexes i should use
as well as another command that being for my custom plugin
/mobcoins pay

What I have tried
I have tried everything the helpers have given me on discord, they didn't really know how to use regexes but helped me as much as they could

Here is what i already got in
command-cooldowns:
'^mobcoins +pay': 3
trade: 3
pay: 3
mail: 30
helpop: 60
feed: 60
'^repair': 30
'^repair( *all)+': 60

The ^^ repair all works for only the /repair all and whatever alias is binded to that all in one and that is done so now the only thing i'm having an issue here is with /repair and its counterpart /repair hand, i wanna make it share the same cooldown because i don't even know why essentials would add it if they already had /repair that does the same exact thing. I tried '^repair( *hand)+': 60 and it still didn't work.

The repair all one works fine though i also tried the same setup for hand but doesn't work
@pop4959 one of the staff here closed my other ticket even though he/she has no knowledge of how to fix it just told me based off what she saw in this writing

commented

Okay if I parsed this all correctly, you want repair & repair hand to succeed under the same regex.

ASSUMING THAT

^repair( +hand)?' 

Should do the trick. Check this out: regexr.com/543bv

commented

How about for "mobcoins pay" since the command has a space and an alias of /mc pay what's the regexes for that? because the way i have it rn doesn't work