Craft Inc. Gates

Craft Inc. Gates

18.3k Downloads

Griefers might be able to close gates by breaking protected gate frame blocks

t-unit opened this issue ยท 5 comments

commented

When using WorldGuard players without permission breaking a gate frame block cause gates to get closed. See this comment.

commented

I had a look at the source codes of GriefPrevention, WorldGuard and of course Craft Inc. Gates.

It's definitely a problem with the event priorities in WorldGuard. Bukkit Wiki states "if you want to change the outcome of an event, choose very carefully from LOWEST to HIGHEST. Suggested generalized protection plugins on lowest, more specific plugins on normal, and override plugins on high." (see here)

WorldGuard however is using HIGH as event priority. See here

GriefPrevention does it right and uses LOWEST. See here

Craft Inc. Gates uses NORMAL, which should be right. So what happens is, Craft Inc. Gates gets the event prior to WorldGuard, checks if it was cancelled, no it wasn't because WorldGuard did not get the event yet, so Craft Inc. Gates does what it does and disables the gate because a frame block was destroyed. After all that WorldGuard begins to check that this block should have never been broken and cancels the event. So I suppose filing a bug at the WorldGuard issue tracker would be the correct and only solution.

I actually think there must be a lot more plugins which do things on BlockBreakEvents and they all must experience problems with WorldGuard.

commented

I found the issue in the WorldGuard bug tracker!

http://youtrack.sk89q.com/issue/WORLDGUARD-2784

commented

This is not an issue when using GriefPrevention.

commented

This is definitely a problem of WorldGuard and not of Craft Inc. Gates.

Changed to won't fix and closed.

commented

On second thought many protection plugins might listen to events with high priority. Changing the priority of our block break listener to MONITOR will solve such issues once and for all. (That's ok since we don't actually handling/canceling those events.)