From ea26ec628db0e5e8e4c843ad06804815c13943dd Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 19 Apr 2019 13:02:50 +1000 Subject: [PATCH] Use Settings.Teleport.ON_LOGIN --- .../intellectualsites/plotsquared/plot/object/PlotPlayer.java | 2 +- .../intellectualsites/plotsquared/plot/util/EventUtil.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java index f25bb988d..a08017a12 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java @@ -541,7 +541,7 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer { return; } - if (!Settings.Enabled_Components.PERSISTENT_META) { + if (!Settings.Teleport.ON_LOGIN) { return; } PlotAreaManager manager = PlotSquared.get().getPlotAreaManager(); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventUtil.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventUtil.java index 4e1d4fd87..0e9a6f40f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventUtil.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/EventUtil.java @@ -7,6 +7,8 @@ import com.github.intellectualsites.plotsquared.plot.flag.Flag; import com.github.intellectualsites.plotsquared.plot.flag.Flags; import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType; import com.github.intellectualsites.plotsquared.plot.object.*; +import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; +import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager; import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager; import javax.annotation.Nullable; @@ -75,7 +77,7 @@ public abstract class EventUtil { } } final Plot plot = player.getCurrentPlot(); - if (Settings.Teleport.ON_LOGIN && plot != null) { + if (Settings.Teleport.ON_LOGIN && plot != null && !(plot.getArea() instanceof SinglePlotArea)) { TaskManager.runTask(() -> plot.teleportPlayer(player)); MainUtil.sendMessage(player, Captions.TELEPORTED_TO_ROAD.f() + " (on-login) " + "(" + plot.getId().x + ";" + plot