SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent

Discussion ongoing in PR #449

By: kaenganxt <kaenganxt@mc-anura.de>
This commit is contained in:
CraftBukkit/Spigot
2018-07-20 16:04:37 +10:00
parent 300a2a1daf
commit 15a21299da
33 changed files with 617 additions and 47 deletions

View File

@@ -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 {