Files
paper-mc/paper-server/patches/sources/net/minecraft/server/commands/EffectCommands.java.patch
Bjarne Koll b745ab65e6 Begin 1.21.6-pre1
Initial move of patches to rejected and non rejected source patches to
publish to patch-roulette.
2025-05-28 13:23:32 +02:00

30 lines
1.4 KiB
Diff

--- a/net/minecraft/server/commands/EffectCommands.java
+++ b/net/minecraft/server/commands/EffectCommands.java
@@ -182,7 +_,7 @@
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++;
}
}
@@ -212,7 +_,7 @@
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++;
}
}
@@ -237,7 +_,7 @@
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++;
}
}