SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449 By: kaenganxt <kaenganxt@mc-anura.de>
This commit is contained in:
11
paper-server/nms-patches/ItemPotion.patch
Normal file
11
paper-server/nms-patches/ItemPotion.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/ItemPotion.java
|
||||
+++ b/net/minecraft/server/ItemPotion.java
|
||||
@@ -30,7 +30,7 @@
|
||||
if (mobeffect.getMobEffect().isInstant()) {
|
||||
mobeffect.getMobEffect().applyInstantEffect(entityhuman, entityhuman, entityliving, mobeffect.getAmplifier(), 1.0D);
|
||||
} else {
|
||||
- entityliving.addEffect(new MobEffect(mobeffect));
|
||||
+ entityliving.addEffect(new MobEffect(mobeffect), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK); // CraftBukkit
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user