mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
814c742554
Discussion ongoing in PR #449
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
--- a/net/minecraft/server/CommandEffect.java
|
|
+++ b/net/minecraft/server/CommandEffect.java
|
|
@@ -62,7 +62,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;
|
|
}
|
|
}
|
|
@@ -88,7 +88,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;
|
|
}
|
|
}
|
|
@@ -113,7 +113,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;
|
|
}
|
|
}
|