aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0158-LivingEntity-setKiller.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0158-LivingEntity-setKiller.patch')
-rw-r--r--patches/server/0158-LivingEntity-setKiller.patch14
1 files changed, 3 insertions, 11 deletions
diff --git a/patches/server/0158-LivingEntity-setKiller.patch b/patches/server/0158-LivingEntity-setKiller.patch
index c8eb4f6720..f705351202 100644
--- a/patches/server/0158-LivingEntity-setKiller.patch
+++ b/patches/server/0158-LivingEntity-setKiller.patch
@@ -5,25 +5,17 @@ Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index b65d44780c7e6e1e2e8724df838d1aa54edcc30a..6455a81fea0de79173419587171b5ed025c30592 100644
+index 4f4ee7071183e7eef918741e38c2bc2e522c72df..a08fd99fb97d8c880c855e6af2a99afcfa8098b5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -8,6 +8,7 @@ import java.util.Iterator;
- import java.util.List;
- import java.util.Set;
- import java.util.UUID;
-+import net.minecraft.server.level.ServerPlayer;
- import net.minecraft.world.InteractionHand;
- import net.minecraft.world.damagesource.DamageSource;
- import net.minecraft.world.effect.MobEffect;
-@@ -344,6 +345,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -347,6 +347,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
}
+ // Paper start
+ @Override
+ public void setKiller(Player killer) {
-+ ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
++ net.minecraft.server.level.ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
+ getHandle().lastHurtByPlayer = entityPlayer;
+ getHandle().lastHurtByMob = entityPlayer;
+ getHandle().lastHurtByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity