From e8a70d7bd1c2ee332440058a4bb8ef34e43455c3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 May 2018 19:40:33 -0400
Subject: [PATCH] Fix Reason = Player for Experience Orb drop

---
 ...ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
index 191b5898ee..718712cfcc 100644
--- a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
+++ b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
@@ -129,7 +129,7 @@ index 6ac89d1e3..177d8582f 100644
                      // CraftBukkit end
                      Item item = itemstack.getItem();
 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
-index 9e864864d..91e8c1d75 100644
+index 9e864864d..38c043375 100644
 --- a/src/main/java/net/minecraft/server/EntityLiving.java
 +++ b/src/main/java/net/minecraft/server/EntityLiving.java
 @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
@@ -138,7 +138,7 @@ index 9e864864d..91e8c1d75 100644
                  i -= j;
 -                this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j));
 +                EntityLiving attacker = killer != null ? killer : lastDamager; // Paper
-+                this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, this instanceof Player ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this)); // Paper
++                this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, this instanceof EntityPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this)); // Paper
              }
              this.expToDrop = 0;
              // CraftBukkit end