1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-21 03:03:02 +01:00

Double check that a Player is not an NPC when loading profiles

This commit is contained in:
nossr50
2019-06-17 07:00:39 -07:00
parent 73ce7e729c
commit 218b2a1a75
8 changed files with 29 additions and 21 deletions

View File

@@ -103,7 +103,7 @@ public class EventUtils {
Entity entity = entityDamageEvent.getEntity();
//Check to make sure the entity is not an NPC
if(Misc.isNPCEntity(entity))
if(Misc.isNPCEntityExcludingVillagers(entity))
return false;
if (!entity.isValid() || !(entity instanceof LivingEntity)) {