0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-25 16:16:14 +00:00
craftbukkit/nms-patches/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.patch
2024-10-23 02:15:00 +11:00

26 lines
997 B
Diff

--- a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
+++ b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
@@ -7,6 +7,10 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.World;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityPotionEffectEvent;
+// CraftBukkit end
+
public record ClearAllStatusEffectsConsumeEffect() implements ConsumeEffect {
public static final ClearAllStatusEffectsConsumeEffect INSTANCE = new ClearAllStatusEffectsConsumeEffect();
@@ -19,7 +23,9 @@
}
@Override
- public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving) {
- return entityliving.removeAllEffects();
+ // CraftBukkit start
+ public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving, EntityPotionEffectEvent.Cause cause) {
+ return entityliving.removeAllEffects(cause);
+ // CraftBukkit end
}
}