SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449 By: kaenganxt <kaenganxt@mc-anura.de>
This commit is contained in:
@@ -26,3 +26,21 @@
|
||||
public int getColor() {
|
||||
return ((Integer) this.datawatcher.get(EntityTippedArrow.f)).intValue();
|
||||
}
|
||||
@@ -180,7 +199,7 @@
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
mobeffect = (MobEffect) iterator.next();
|
||||
- entityliving.addEffect(new MobEffect(mobeffect.getMobEffect(), Math.max(mobeffect.getDuration() / 8, 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isShowParticles()));
|
||||
+ entityliving.addEffect(new MobEffect(mobeffect.getMobEffect(), Math.max(mobeffect.getDuration() / 8, 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isShowParticles()), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
|
||||
}
|
||||
|
||||
if (!this.effects.isEmpty()) {
|
||||
@@ -188,7 +207,7 @@
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
mobeffect = (MobEffect) iterator.next();
|
||||
- entityliving.addEffect(mobeffect);
|
||||
+ entityliving.addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user