Fix Citizens being regarded as players when attacking and attacked

This commit is contained in:
Daniel Saukel 2017-11-17 15:04:32 +01:00
parent cef9169b54
commit e4f573e3b8

View File

@ -154,6 +154,9 @@ public class DPlayerListener implements Listener {
if (attackerEntity instanceof Player && attackedEntity instanceof Player) {
attackerPlayer = (Player) attackerEntity;
attackedPlayer = (Player) attackedEntity;
if (attackedPlayer.hasMetadata("NPC") || attackerPlayer.hasMetadata("NPC")) {
return;
}
attackerDGroup = DGroup.getByPlayer(attackerPlayer);
attackedDGroup = DGroup.getByPlayer(attackedPlayer);