From b77b615dd468b87953c286139b666a71d1a8d06e Mon Sep 17 00:00:00 2001 From: boy0001 Date: Wed, 5 Aug 2015 00:32:26 +1000 Subject: [PATCH] Fixed plot list --- pom.xml | 17 ++++++++++++++++- .../java/com/intellectualcrafters/plot/PS.java | 2 +- .../plot/commands/list.java | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4970666ae..69be3ff11 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ PlotSquared jar - PlotSquared + PlotSquared-Uber src/main/java @@ -67,6 +67,21 @@ + + api + + jar + + package + + PlotSquared-Null + + **/com/plotsquared/bukkit/** + **/com/plotsquared/sponge/** + **/com/intellectualcrafters/plot/api/* + + + diff --git a/src/main/java/com/intellectualcrafters/plot/PS.java b/src/main/java/com/intellectualcrafters/plot/PS.java index 0398214d5..f14efc858 100644 --- a/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/src/main/java/com/intellectualcrafters/plot/PS.java @@ -538,7 +538,7 @@ public class PS { List overflow = new ArrayList(overflowSize); for (Plot plot : plots) { int hash = MathMan.getPositiveId(plot.hashCode()); - if (hash < hardmax) { + if (hash < hardmax && hash > -1) { cache[hash] = plot; } else { diff --git a/src/main/java/com/intellectualcrafters/plot/commands/list.java b/src/main/java/com/intellectualcrafters/plot/commands/list.java index 125cf91d0..3c1c2c4ae 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -304,7 +304,7 @@ public class list extends SubCommand { public void displayPlots(PlotPlayer player, List plots, int pageSize, int page, String world, String[] args, boolean sort) { if (sort) { - plots = PS.get().sortPlots(plots, SortType.CREATION_DATE, world); + plots = PS.get().sortPlots(plots, SortType.DISTANCE_FROM_ORIGIN, world); } if (page < 0) { page = 0;