Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Added hashCode and equals to CraftWorld
Dieser Commit ist enthalten in:
Ursprung
1195944c90
Commit
7e005474b6
@ -870,4 +870,23 @@ public class CraftWorld implements World {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getUID().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final CraftWorld other = (CraftWorld) obj;
|
||||
|
||||
return this.getUID() == other.getUID();
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren