mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-12-06 11:17:20 +00:00
[Bugfix] Fix ServerDescription to use proper compare() to prevent conflict with matching names, authors and versions
This commit is contained in:
1 parent
788fe3e6c8
commit
8a2255ac90
1 file changed
+4
-1
@@ -39,7 +39,10 @@ public class ServerDescription implements Comparable<ServerDescription> {
|
||||
@Override
|
||||
public int compareTo(ServerDescription o) {
|
||||
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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user