From 52bcc1c28e2b4749ca327d077606266c76fc90ae Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 14 Jan 2012 01:25:12 +0100 Subject: [PATCH] [Bleeding] Added DamageCause.POISON/MAGIC and RegainReason.MAGIC/MAGIC_REGEN for potions By: Zeerix --- .../org/bukkit/event/entity/EntityDamageEvent.java | 12 ++++++++++++ .../bukkit/event/entity/EntityRegainHealthEvent.java | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java index 4706bb53ad..5c10c02e60 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java @@ -167,6 +167,18 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { * Damage: 1 */ STARVATION, + /** + * Damage caused due to an ongoing poison effect + * + * Damage: 1 + */ + POISON, + /** + * Damage caused by being hit by a damage potion or spell + * + * Damage: variable + */ + MAGIC, /** * Custom damage. *

diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java index 059dea537a..3e84de8b56 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java @@ -83,6 +83,14 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable * When a player regains health from eating consumables */ EATING, + /** + * When a player is healed by a potion or spell + */ + MAGIC, + /** + * When a player is healed over time by a potion or spell + */ + MAGIC_REGEN, /** * Any other reason not covered by the reasons above */