2024-12-14 13:42:43 -08:00
|
|
|
--- a/net/minecraft/server/commands/EffectCommands.java
|
|
|
|
+++ b/net/minecraft/server/commands/EffectCommands.java
|
2025-05-28 13:23:32 +02:00
|
|
|
@@ -182,7 +_,7 @@
|
2024-12-14 13:42:43 -08:00
|
|
|
for (Entity entity : targets) {
|
|
|
|
if (entity instanceof LivingEntity) {
|
|
|
|
MobEffectInstance mobEffectInstance = new MobEffectInstance(effect, i1, amplifier, false, showParticles);
|
|
|
|
- if (((LivingEntity)entity).addEffect(mobEffectInstance, source.getEntity())) {
|
|
|
|
+ if (((LivingEntity)entity).addEffect(mobEffectInstance, source.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
2025-05-28 13:23:32 +02:00
|
|
|
@@ -212,7 +_,7 @@
|
2024-12-14 13:42:43 -08:00
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
for (Entity entity : targets) {
|
|
|
|
- if (entity instanceof LivingEntity && ((LivingEntity)entity).removeAllEffects()) {
|
|
|
|
+ if (entity instanceof LivingEntity && ((LivingEntity)entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
2025-05-28 13:23:32 +02:00
|
|
|
@@ -237,7 +_,7 @@
|
2024-12-14 13:42:43 -08:00
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
for (Entity entity : targets) {
|
|
|
|
- if (entity instanceof LivingEntity && ((LivingEntity)entity).removeEffect(effect)) {
|
|
|
|
+ if (entity instanceof LivingEntity && ((LivingEntity)entity).removeEffect(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|