mung3r / ecoCreature

PvM/E Rewards
http://forums.bukkit.org/threads/29538
GNU Lesser General Public License v3.0
7 stars 12 forks source link

Check for cancelled events! #40

Closed sorklin closed 12 years ago

sorklin commented 12 years ago

Before rewarding for destroying a spawner, it would be nice if you checked for cancelled events. We have spawners that are WorldGuarded (not by design, but circumstance). When someone destroys the block, they are given the reward, but the block is not destroyed (since WG cancels it). If your priority is monitor (which it should be since you don't cancel events), you'll always know if a plugin has cancelled it (for example, modifyworld, residence, or worldguard).

As it stands, a player can destroy a protected spawner over and over again and completely destroy the economy.

sorklin commented 12 years ago

I see in your code that you actually do check for cancelled events and are on monitor priority, so sorry for not looking first. However, its still giving rewards for destroying spawners in protected areas

mung3r commented 12 years ago

I have only tested with WG. Do you know what other region plugin is causing this issue?

sorklin commented 12 years ago

WG. I defined a region, made sure I couldn't build in it, and when I break the spawner (which is cancelled), I get the money. I'm using the 0.0.9c from 2 Jan. Screenshot of this: http://dl.dropbox.com/u/122940/MC/2012-01-29_20.33.45.png

sorklin commented 12 years ago

Okay, I just compiled your code here, and it behaves correctly. However the compiled version on bukkitdev does not. Can you recompile and update the bukkit dev version??

mung3r commented 12 years ago

Yup, your timing is uncanny. I'm prepping an update that should go up tonight. Thanks for your input.

mung3r commented 12 years ago

New version posted on dev bukkit.