sk89q/worldguard — pull request #295 by InflamedSebi (2013-12-04 14:14:45+00:00)
Title: Better compatibility with other plugins.

The event system should allow other plugins to edit the result, so it's not recommended to send hardcoded messages to a player without giving other plugin the chance to modify/cancel it.

So for example if a player breaks a block and the region is protected, he will get the "You don't have permission for this area." message, even if a plugin with EventPriority.HIGHEST uncancelled the event because the block was whitelisted or something similar.

I would suggest putting cancelled events (and the corresponding message) to a HashMap and recheck the status on the EventPriority.MONITOR. Because this priority is only used for checking the result of an event without changing it.

The changes to the file are just an example how to avoid those issues and can simply be added to every event without big changes.