Use Entity Id's instead of Player Name

This commit is contained in:
david 2018-02-14 18:09:12 +01:00
parent 806e3c2ef8
commit b513e6dfbd
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ public class SelfHit extends Check {
}
public boolean check(final Player damager, final Player damaged, final FightData data, final FightConfig cc){
if (!damager.getName().equals(damaged.getName())) return false;
// Check if the Entity Id's are Equals
if (damager.getEntityId() != damaged.getEntityId()) return false;
boolean cancel = false;
// Treat self hitting as instant violation.