!Fixed a small issue with NPCs and KillMythicMob exp source

This commit is contained in:
Indyuce 2020-03-27 21:39:36 +01:00
parent 208d5d18b1
commit 6b3f3fb920

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) && !event.getKiller().hasMetadata("NPC")) return;
if (!(event.getKiller() instanceof Player) || event.getKiller().hasMetadata("NPC")) return;
PlayerData data = PlayerData.get((Player) event.getKiller());
for (KillMythicMobExperienceSource source : getSources())