mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-09 05:53:22 +00:00
Fix plot visit sorting
This commit is contained in:
parent
01a927ccad
commit
f5a981fda7
1 changed files with 6 additions and 2 deletions
|
@ -829,8 +829,12 @@ public class PS{
|
||||||
Collections.sort(areas, new Comparator<PlotArea>() {
|
Collections.sort(areas, new Comparator<PlotArea>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(PlotArea a, PlotArea b) {
|
public int compare(PlotArea a, PlotArea b) {
|
||||||
if (priorityArea != null && StringMan.isEqual(a.toString(), b.toString())) {
|
if (priorityArea != null) {
|
||||||
return -1;
|
if (a.equals(priorityArea)) {
|
||||||
|
return -1;
|
||||||
|
} else if (b.equals(priorityArea)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return a.hashCode() - b.hashCode();
|
return a.hashCode() - b.hashCode();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue