Merge pull request #265 from Shadowrs/bugfix/server-desc-comparitor

[Bugfix] ServerDescription comparitor fix
This commit is contained in:
Jeroen Ketelaar
2018-09-14 14:22:46 -05:00
committed by GitHub
@@ -39,7 +39,10 @@ public class ServerDescription implements Comparable<ServerDescription> {
@Override @Override
public int compareTo(ServerDescription o) { public int compareTo(ServerDescription o) {
if (this.getServerName().equalsIgnoreCase(o.getServerName())) { if (this.getServerName().equalsIgnoreCase(o.getServerName())) {
return 1; if (getAuthor().equals(o.getAuthor())) {
return Double.compare(o.getRevision(), getRevision());
}
return getAuthor().compareTo(o.getAuthor());
} }
return this.getServerName().compareTo(o.getServerName()); return this.getServerName().compareTo(o.getServerName());
} }