SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449 By: kaenganxt <kaenganxt@mc-anura.de>
This commit is contained in:
15
paper-server/nms-patches/ItemGoldenApple.patch
Normal file
15
paper-server/nms-patches/ItemGoldenApple.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/server/ItemGoldenApple.java
|
||||
+++ b/net/minecraft/server/ItemGoldenApple.java
|
||||
@@ -8,8 +8,10 @@
|
||||
|
||||
protected void a(ItemStack itemstack, World world, EntityHuman entityhuman) {
|
||||
if (!world.isClientSide) {
|
||||
- entityhuman.addEffect(new MobEffect(MobEffects.REGENERATION, 100, 1));
|
||||
- entityhuman.addEffect(new MobEffect(MobEffects.ABSORBTION, 2400, 0));
|
||||
+ // CraftBukkit start
|
||||
+ entityhuman.addEffect(new MobEffect(MobEffects.REGENERATION, 100, 1), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD);
|
||||
+ entityhuman.addEffect(new MobEffect(MobEffects.ABSORBTION, 2400, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user