2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/server/commands/CommandEffect.java
|
|
|
|
+++ b/net/minecraft/server/commands/CommandEffect.java
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -84,7 +84,7 @@
|
2018-07-20 08:04:37 +02:00
|
|
|
if (entity instanceof EntityLiving) {
|
2024-04-23 17:15:00 +02:00
|
|
|
MobEffect mobeffect = new MobEffect(holder, k, i, false, flag);
|
2018-07-20 08:04:37 +02:00
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
- if (((EntityLiving) entity).addEffect(mobeffect, commandlistenerwrapper.getEntity())) {
|
|
|
|
+ if (((EntityLiving) entity).addEffect(mobeffect, commandlistenerwrapper.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
2018-07-20 08:04:37 +02:00
|
|
|
++j;
|
|
|
|
}
|
|
|
|
}
|
2023-06-07 17:30:00 +02:00
|
|
|
@@ -114,7 +114,7 @@
|
2018-07-20 08:04:37 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
2023-06-07 17:30:00 +02:00
|
|
|
@@ -144,7 +144,7 @@
|
2018-07-20 08:04:37 +02:00
|
|
|
while (iterator.hasNext()) {
|
|
|
|
Entity entity = (Entity) iterator.next();
|
|
|
|
|
2024-04-23 17:15:00 +02:00
|
|
|
- if (entity instanceof EntityLiving && ((EntityLiving) entity).removeEffect(holder)) {
|
|
|
|
+ if (entity instanceof EntityLiving && ((EntityLiving) entity).removeEffect(holder, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
2018-07-20 08:04:37 +02:00
|
|
|
++i;
|
|
|
|
}
|
|
|
|
}
|