Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Implementation of CommandFilters, replacing cooldowns and costs

Open FrankHeijden opened this issue 5 years ago • 13 comments

Basically implements #3200, with just a small difference in yaml format: made the name required, as a key, just like kits. Automatic converter is included, and will create the new yaml format from existing nodes. Formats for command will be the same as with the command-costs, formats for pattern will be the same as in command-cooldowns.

Closes #3200, #3847

FrankHeijden avatar Dec 29 '20 22:12 FrankHeijden

How does this affect PR #3744 ?

Bobcat00 avatar Dec 30 '20 00:12 Bobcat00

How does this affect PR #3744 ?

They should go hand in hand with each other, defining a pattern filter in this version will behave the same as a regular command-cooldown in that PR

FrankHeijden avatar Dec 30 '20 00:12 FrankHeijden

They should go hand in hand with each other, defining a pattern filter in this version will behave the same as a regular command-cooldown in that PR

So this PR needs #3744 ? Just asking because 3744 hasn't been merged yet.

Bobcat00 avatar Dec 30 '20 00:12 Bobcat00

They should go hand in hand with each other, defining a pattern filter in this version will behave the same as a regular command-cooldown in that PR

So this PR needs #3744 ? Just asking because 3744 hasn't been merged yet.

I mean they are independent features -- #3744 fixes a bug where commands.yml defined commands aren't recognised by EssX, this one refactors the cooldowns/costs into a separate yml file as described per #3200 (and by doing that fixing a bug where periods couldn't be used in the regexes, because yml prohibits periods in keys).

FrankHeijden avatar Dec 30 '20 00:12 FrankHeijden

So I just came across a thing which prevented AsyncTeleport's from applying command cooldowns - this is due to the fact AsyncTeleport creates a new Trade without the command defined in it. I added a new cooldownCommand parameter for the Trade#charge() command, so this method can know what command we should apply cooldowns on.

FrankHeijden avatar Dec 31 '20 19:12 FrankHeijden

Conflicts need to be addressed, please reopen when done so.

JRoy avatar Jun 11 '21 15:06 JRoy

Cant reopen this one, opening #4224 instead

FrankHeijden avatar Jun 11 '21 15:06 FrankHeijden

What’s the status on this PR? 😅

FrankHeijden avatar Jul 27 '21 06:07 FrankHeijden

What’s the status on this PR? 😅

This likely won't make it in time for 2.19 but 100% 2.20/2.19.x

JRoy avatar Jul 27 '21 15:07 JRoy

Needs to be updated to configurate (use EssentialsConfiguration over EssentialsConf)

Done

FrankHeijden avatar Dec 03 '21 23:12 FrankHeijden

Just a quick heads-up: I have a pending review for this PR, but I likely won't have time to properly review this for a few weeks.

mdcfe avatar Dec 29 '21 12:12 mdcfe

Remaining errors (EssentialsConf and logger stuff) need to be fixed. It's almost been 2 years since this PR was made, and I appreciate your persistence 😅. This pull request will be merged for 2.20 which is HOPEFULLY before the new year.

JRoy avatar Oct 14 '22 22:10 JRoy

@JRoy Some build dependencies are timing out because they redirect to jcenter, which closed down. Do they need to be updated or is there a repo missing for these dependencies?

WkyRXerS

FrankHeijden avatar Oct 30 '22 23:10 FrankHeijden