Bukkit/Bukkit — pull request #926 by turt2live (2013-09-10 04:40:40+00:00)
Title: [B+C] Added EntityPotionEffectChangeEvent. Adds BUKKIT-2817

**The Issue:**

There is no current way to handle when an entity (especially players) gain or lose a potion effect.

**Justification**

With this addition, plugins will be able to control further what potion effects players can have, or cannot have. This could be used within plot plugins to restrict beacons having an effect outside of the placed plot.

**PR Breakdown:**

This PR adds a new event for plugins to use. Within CraftBukkit there is implementation to handle gain/loss of effects.

**Testing Results / Materials:**

Plugin code used to test: https://gist.github.com/turt2live/5369425
Compiled Binary: http://home.turt2live.com/PotionTest.jar

Steps to apply cancel testing, type "/test". To revert, type "/test" again.

To apply a plugin-made effect, type "/test a"

**Associated PRs**

B-717 - https://github.com/Bukkit/Bukkit/pull/717 - API portion for this event
CB-967 - https://github.com/Bukkit/CraftBukkit/pull/1242 - Implementation for this event

**JIRA Tickets**

Main ticket: https://bukkit.atlassian.net/browse/BUKKIT-2817
Subsequent (duplicate) tickets
https://bukkit.atlassian.net/browse/BUKKIT-2361
https://bukkit.atlassian.net/browse/BUKKIT-1535
https://bukkit.atlassian.net/browse/BUKKIT-1778
https://bukkit.atlassian.net/browse/BUKKIT-763