aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch
blob: 98d850e86a36c2b37d1f3624f6c58c384a02d7b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/net/minecraft/server/commands/EffectCommands.java
+++ b/net/minecraft/server/commands/EffectCommands.java
@@ -85,7 +84,7 @@
             if (entity instanceof LivingEntity) {
                 MobEffectInstance mobeffectinstance = new MobEffectInstance(mobeffect, k, i, false, flag);
 
-                if (((LivingEntity) entity).addEffect(mobeffectinstance, commandsourcestack.getEntity())) {
+                if (((LivingEntity) entity).addEffect(mobeffect, source.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
                     ++j;
                 }
             }
@@ -115,7 +114,7 @@
         while (iterator.hasNext()) {
             Entity entity = (Entity) iterator.next();
 
-            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeAllEffects()) {
+            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
                 ++i;
             }
         }
@@ -145,7 +144,7 @@
         while (iterator.hasNext()) {
             Entity entity = (Entity) iterator.next();
 
-            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeEffect(mobeffect)) {
+            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeEffect(mobeffectlist, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
                 ++i;
             }
         }