Fixed wrong players compare (not by UUID -- see #4407)

This commit is contained in:
Oleg Agafonov 2018-01-27 13:23:03 +04:00
parent 9d131f6bde
commit c69b3f4609

View file

@ -3772,4 +3772,22 @@ public abstract class PlayerImpl implements Player, Serializable {
public List<Designation> getDesignations() { public List<Designation> getDesignations() {
return designations; return designations;
} }
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PlayerImpl obj = (PlayerImpl) o;
if (this.getId() == null || obj.getId() == null) {
return false;
}
return this.getId().equals(obj.getId());
}
}