sk89q/worldguard — pull request #175 by Moo0 (2011-10-27 20:42:27+00:00)
Title: Peace mode

A togglable mode, similar to god mode, which prevents hostile mobs from targetting you. No more being attacked or followed, allowing you to get on with your business without distractions, and without having to butcher/kill/disable the mobs. It doesn't affect any mobs that may already be targetting you when you turn it on, and if you attack mobs, they will still respond as usual.
I've used the same permissions as god mode, but if you think someone might want to grant these abilities individually, I can change that. Auto-invincible also enables peace.
It works by cancelling the target event. The mob will try to target again shortly after; it's not a perfect solution, but it works. If you can think of a better way to do it, please tell.