Bukkit/CraftBukkit — pull request #1358 by gabizou (2014-03-29 04:41:13+00:00)
Title: [B+C] Implement EntityPotionEffectChangeEvent. Adds BUKKIT-1535

**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. Additional use can be to use beacon effect events to trigger adding additional effects.

**PR Breakdown:**

Thanks to @turt2live for handing me the PR.

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://github.com/gabizou/PotionsTest
Compiled Binary: https://dl.dropboxusercontent.com/u/9058563/PotionsTest.jar

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

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

**Associated PRs**

Bukkit: https://github.com/Bukkit/Bukkit/pull/1011
old CraftBukkit PR: https://github.com/Bukkit/CraftBukkit/pull/1324
CraftBukkit: tba

**JIRA Tickets**

Main ticket: https://bukkit.atlassian.net/browse/BUKKIT-5329
Subsequent (duplicate) tickets
https://bukkit.atlassian.net/browse/BUKKIT-2817
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