From a1c722aa9eb5de9739b9f9b80331b99d2ff17002 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 5 Jun 2016 20:03:05 +1000 Subject: [PATCH] Fix player location/current plot --- .../intellectualcrafters/plot/object/PlotPlayer.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java b/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java index ef796c9ee..25f19afde 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java @@ -112,7 +112,11 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer { * @return the plot the player is standing on or null if standing on a road or not in a {@link PlotArea} */ public Plot getCurrentPlot() { - return (Plot) getMeta("lastplot"); + Plot value = (Plot) getMeta("lastplot"); + if (value == null && !Settings.ENABLED_COMPONENTS.EVENTS) { + return getLocation().getPlot(); + } + return value; } /** @@ -216,7 +220,7 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer { if (location != null) { return location; } - return null; + return getLocationFull(); } //////////////////////////////////////////////// @@ -437,7 +441,7 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer { public abstract void stopSpectating(); /** - * The amount of money this playe + * The amount of money this player has * @return */ public double getMoney() {