geforkt von Mirrors/Velocity
ServerInfo is now comparable
Dieser Commit ist enthalten in:
Ursprung
983f3012a6
Commit
260f7f575a
@ -9,7 +9,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
* ServerInfo represents a server that a player can connect to. This object is immutable and safe
|
||||
* for concurrent access.
|
||||
*/
|
||||
public final class ServerInfo {
|
||||
public final class ServerInfo implements Comparable<ServerInfo> {
|
||||
|
||||
private final String name;
|
||||
private final InetSocketAddress address;
|
||||
@ -58,4 +58,9 @@ public final class ServerInfo {
|
||||
public final int hashCode() {
|
||||
return Objects.hash(name, address);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ServerInfo o) {
|
||||
return this.name.compareTo(o.getName());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren