PaperMC/nms-patches/CommandEffect.patch

30 lines
1.4 KiB
Diff
Raw Normal View History

--- a/net/minecraft/server/CommandEffect.java
+++ b/net/minecraft/server/CommandEffect.java
2019-12-10 23:00:00 +01:00
@@ -63,7 +63,7 @@
if (entity instanceof EntityLiving) {
MobEffect mobeffect = new MobEffect(mobeffectlist, k, i, false, flag);
- if (((EntityLiving) entity).addEffect(mobeffect)) {
+ if (((EntityLiving) entity).addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
++j;
}
}
2019-12-10 23:00:00 +01:00
@@ -89,7 +89,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
- if (entity instanceof EntityLiving && ((EntityLiving) entity).removeAllEffects()) {
+ if (entity instanceof EntityLiving && ((EntityLiving) entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
++i;
}
}
2019-12-10 23:00:00 +01:00
@@ -114,7 +114,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
- if (entity instanceof EntityLiving && ((EntityLiving) entity).removeEffect(mobeffectlist)) {
+ if (entity instanceof EntityLiving && ((EntityLiving) entity).removeEffect(mobeffectlist, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
++i;
}
}