meiskam / PlayerHeads

Bukkit Plugin - Drops a player's head when s/he dies, also mob heads
https://dev.bukkit.org/projects/player-heads
Other
16 stars 39 forks source link

Ignore cancelled skull click events #4

Closed ams2990 closed 10 years ago

ams2990 commented 10 years ago

Even if the click event is cancelled, PlayerHeads still tells you to whom the head belongs. This change ignores the click if another plugin has marked it as cancelled. Block logging plugins, for instance, will cancel click events if the player is looking up logs at that location.

meiskam commented 10 years ago

Does this change fix the issue you had? I was under the impression the MONITOR priority was never called if the event was cancelled, which is why I left that snippet out.

ams2990 commented 10 years ago

Yes, the code change fixes the issue. MONITOR is always called -- it's just in the contract that you're not allowed to make changes to the event from that level. There's nothing about not being called for cancelled events.