From 52984864033e6df545bf640f68611b46a84759c1 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 27 Sep 2014 10:21:00 +1000 Subject: [PATCH] Oh yeah.. I was in offline mode. That explains a lot. --- .../src/com/intellectualcrafters/plot/PlayerFunctions.java | 3 +++ .../src/com/intellectualcrafters/plot/commands/Info.java | 3 +++ .../intellectualcrafters/plot/database/PlotMeConverter.java | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlayerFunctions.java b/PlotSquared/src/com/intellectualcrafters/plot/PlayerFunctions.java index b18dcbe85..afbd7197c 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/PlayerFunctions.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/PlayerFunctions.java @@ -137,6 +137,9 @@ public class PlayerFunctions { String world = loc.getWorld().getName(); PlotWorld plotworld = PlotMain.getWorldSettings(world); + if (plotworld==null) { + return null; + } int size = plotworld.PLOT_WIDTH + plotworld.ROAD_WIDTH; int pathWidthLower; if ((plotworld.ROAD_WIDTH % 2) == 0) { diff --git a/PlotSquared/src/com/intellectualcrafters/plot/commands/Info.java b/PlotSquared/src/com/intellectualcrafters/plot/commands/Info.java index d7f8c7228..8457628c4 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/commands/Info.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/commands/Info.java @@ -71,6 +71,9 @@ public class Info extends SubCommand { if (plot.owner != null) { owner = Bukkit.getOfflinePlayer(plot.owner).getName(); } + if (owner==null) { + owner = plot.owner.toString(); + } String info = C.PLOT_INFO.s(); info = info.replaceAll("%alias%", plot.settings.getAlias().length() > 0 ? plot.settings.getAlias() : "none"); diff --git a/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java b/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java index afbb67cd2..4d4b95acd 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java @@ -42,8 +42,6 @@ public class PlotMeConverter { // TODO generate configuration based on PlotMe config // TODO // - Plugin doesn't display a message if database is not setup at all - // - I get null pointer exceptions when I try to use the plugin after the conversion process - // - Could be my fault when I added multiworld, or mega plots or something... PlotMain.sendConsoleSenderMessage("Converting " + plots.size() + " plots for '" + world.toString() + "'..."); for (Plot plot : plots.values()) {