Fix plot visit sorting

This commit is contained in:
Jesse Boyd 2018-08-24 06:46:53 +10:00
parent 01a927ccad
commit f5a981fda7
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -829,8 +829,12 @@ public class PS{
Collections.sort(areas, new Comparator<PlotArea>() {
@Override
public int compare(PlotArea a, PlotArea b) {
if (priorityArea != null && StringMan.isEqual(a.toString(), b.toString())) {
if (priorityArea != null) {
if (a.equals(priorityArea)) {
return -1;
} else if (b.equals(priorityArea)) {
return 1;
}
}
return a.hashCode() - b.hashCode();
}