Ensure we're not dealing with a fake player. Fixes #1749

This commit is contained in:
GJ 2014-01-03 09:19:07 -05:00
parent 26174d88f4
commit e0358d42d6

View File

@ -64,7 +64,7 @@ public final class Misc {
} }
public static boolean isNPCEntity(Entity entity) { public static boolean isNPCEntity(Entity entity) {
return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger"))); return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")) || entity.getClass().getName().equalsIgnoreCase("cofh.entity.PlayerFake"));
} }
/** /**