--- a/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java
+++ b/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java
@@ -44,7 +_,7 @@
                 int max = Math.max(
                     0, Math.round(Mth.randomBetween(random, this.minAmplifier.calculate(enchantmentLevel), this.maxAmplifier.calculate(enchantmentLevel)))
                 );
-                livingEntity.addEffect(new MobEffectInstance(randomElement.get(), rounded, max));
+                livingEntity.addEffect(new MobEffectInstance(randomElement.get(), rounded, max), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
             }
         }
     }
