Fixed a bug when NPCs would trigger MythicMob exp (causing an error)

This commit is contained in:
Aria Sangarin 2020-02-26 13:13:50 +01:00
parent 6d7001fac2
commit 0c34892138

View File

@ -31,7 +31,7 @@ public class KillMythicMobExperienceSource extends SpecificExperienceSource<Stri
@Override
public void run() {
if (!event.getEntity().isDead()) return;
if (!(event.getKiller() instanceof Player)) return;
if (!(event.getKiller() instanceof Player) && !event.getKiller().hasMetadata("NPC")) return;
PlayerData data = PlayerData.get((Player) event.getKiller());
for (KillMythicMobExperienceSource source : getSources())