MihaiChirculete / WorldGuard

The fastest world protector in town for your PocketMine server!
GNU General Public License v3.0
58 stars 36 forks source link

EnderPearl Cooldown doesnt work #192

Closed ItsMax123 closed 3 years ago

ItsMax123 commented 4 years ago

Describe the bug When the allow-enderpearl flag is on, you can spam pear inside areasl, the default 1 second cooldown is just gone. And also installing a pearl cooldown plugin doesn't work inside a worldguard area.

To Reproduce Steps to reproduce the behavior:

  1. Allow pearls in an area
  2. Go to that area
  3. Keep right button down while holding many pearls
  4. Watch as like they are all thrown at a very fast interval
  5. Go outside the area
  6. Try the same thing
  7. See the default pocketmine pearl cooldown.

Expected behavior There should be a cooldown on enderpearls that is 20 tics (or 1 second)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

awgybop1 commented 4 years ago

I'm not sure how the enderpearl system is made but it definitely should not be doing that. It shouldn't be doing anything different if the flag is not set to deny, I'll check into it.

awgybop1 commented 4 years ago

Confirmed issue, will be fixing ASAP.

ItsMax123 commented 4 years ago

I just found out that even if I download an EnderPearlCooldown plugin it doesnt work. The EnderPearlCooldown plugin just doesnt work inside worldguard regions.

ItsMax123 commented 4 years ago

Found a fix! Basically, I tested the pluginbypass and it fixed the pearl glitch BUT it also breaks the break/place restriction. So I just made my own seperate plugin and just coded so people cant break and place within the coords i wanted. Complicated fix which could probably be done easier but atleast it works! Hopefully this helps you spot the error and fix it! You can close the issue when you read this. TY

(I can send the code i used for my plugin if it makes your life easier)

suerion commented 4 years ago

I think, i will look on this tomorrow again, i think, this has nothing to do with pluginbypass, i will look on it again

awgybop1 commented 3 years ago

This is a very weird issue caused by WorldGuard that globally removes the Enderpearl Cooldown - which doesn't make any sense. I'll have to do a lot of experimenting to figure out why this is happening, but I will let you know once I find a fix for it!

suerion commented 3 years ago

I had merged the pull request from @ItsMax123 #221 i had tested it, and it worked fine.... I hope i get an better pc soon,

bluescreens overwhelming my system...