mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-25 16:16:14 +00:00
26 lines
997 B
Diff
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
|
|
}
|
|
}
|