mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed wrong players compare (not by UUID -- see #4407)
This commit is contained in:
parent
9d131f6bde
commit
c69b3f4609
1 changed files with 19 additions and 1 deletions
|
@ -3772,4 +3772,22 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
public List<Designation> getDesignations() {
|
||||
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());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue