mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
[Bugfix] Fix ServerDescription to use proper compare() to prevent conflict with matching names, authors and versions
This commit is contained in:
@@ -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());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user