From 9bca812d28d51ccb3236ce2796cb9a7ea3c4f2aa Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 2 Jan 2015 12:35:47 +1100 Subject: [PATCH] Fixed plugin.yml --- .../com/intellectualcrafters/plot/PlotMain.java | 13 ++++++++----- .../plot/generator/HybridGen.java | 2 +- .../intellectualcrafters/plot/util/PlotHelper.java | 3 +++ PlotSquared/src/main/resources/plugin.yml | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index 556b0939a..adf267893 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -308,15 +308,18 @@ import java.util.concurrent.TimeUnit; * @param player player * * @return Set Containing the players plots + * - ignores non plot worlds */ public static Set getPlots(final Player player) { final UUID uuid = UUIDHandler.getUUID(player); final ArrayList myplots = new ArrayList<>(); - for (final HashMap world : plots.values()) { - for (final Plot plot : world.values()) { - if (plot.hasOwner()) { - if (plot.getOwner().equals(uuid)) { - myplots.add(plot); + for (final String world : plots.keySet()) { + if (isPlotWorld(world)) { + for (final Plot plot : plots.get(world).values()) { + if (plot.hasOwner()) { + if (plot.getOwner().equals(uuid)) { + myplots.add(plot); + } } } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java index c6fc5ed96..f1b3a8e48 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java @@ -51,7 +51,7 @@ public class HybridGen extends PlotGenerator { /** * Set to static to re-use the same managet for all Default World Generators */ - private static PlotManager manager = null; + private PlotManager manager = null; /** * Some generator specific variables (implementation dependent) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java index 9963aa1fc..4bb4b8ec7 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java @@ -1037,6 +1037,9 @@ import java.util.UUID; } final PlotWorld plotworld = PlotMain.getWorldSettings(world); final PlotManager manager = PlotMain.getPlotManager(world); + System.out.print("WORLD = "+(world)); + System.out.print("MANAGER = "+(manager == null)); + System.out.print("PLOTWORLD = "+(plotworld == null)); return manager.getPlotBottomLocAbs(plotworld, id); } diff --git a/PlotSquared/src/main/resources/plugin.yml b/PlotSquared/src/main/resources/plugin.yml index b938b4208..12dd13b1b 100644 --- a/PlotSquared/src/main/resources/plugin.yml +++ b/PlotSquared/src/main/resources/plugin.yml @@ -5,7 +5,7 @@ load: STARTUP description: > Easy, yet powerful Plot World generation and management. authors: [Citymonstret, Empire92] -softdepend: [WorldEdit, BarAPI, PlotMe, CameraAPI] +softdepend: [WorldEdit, BarAPI, PlotMe, CameraAPI, Vault] database: false commands: plots: