SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449 By: kaenganxt <kaenganxt@mc-anura.de>
This commit is contained in:
@@ -18,6 +18,15 @@
|
||||
this.c(entityhuman);
|
||||
this.s(true);
|
||||
this.world.broadcastEntityEffect(this, (byte) 7);
|
||||
@@ -190,7 +190,7 @@
|
||||
itemstack.subtract(1);
|
||||
}
|
||||
|
||||
- this.addEffect(new MobEffect(MobEffects.POISON, 900));
|
||||
+ this.addEffect(new MobEffect(MobEffects.POISON, 900), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // CraftBukkit
|
||||
if (entityhuman.u() || !this.bl()) {
|
||||
this.damageEntity(DamageSource.playerAttack(entityhuman), Float.MAX_VALUE);
|
||||
}
|
||||
@@ -310,7 +310,8 @@
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user