From f5a981fda7c34b132dc1898bb70c2cb433dabc0c Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 24 Aug 2018 06:46:53 +1000 Subject: [PATCH] Fix plot visit sorting --- Core/src/main/java/com/intellectualcrafters/plot/PS.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/PS.java b/Core/src/main/java/com/intellectualcrafters/plot/PS.java index a2f842f94..93d63bc4a 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/PS.java @@ -829,8 +829,12 @@ public class PS{ Collections.sort(areas, new Comparator() { @Override public int compare(PlotArea a, PlotArea b) { - if (priorityArea != null && StringMan.isEqual(a.toString(), b.toString())) { - return -1; + if (priorityArea != null) { + if (a.equals(priorityArea)) { + return -1; + } else if (b.equals(priorityArea)) { + return 1; + } } return a.hashCode() - b.hashCode(); }