From ae0ee1ebddec902e31f2aecf9a74ad43f25b6674 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 8 Jan 2021 11:39:49 +0000 Subject: [PATCH] fix teleport to "*" --- Core/src/main/java/com/plotsquared/core/command/Area.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Area.java b/Core/src/main/java/com/plotsquared/core/command/Area.java index db4779272..052c8b07f 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Area.java +++ b/Core/src/main/java/com/plotsquared/core/command/Area.java @@ -48,6 +48,7 @@ import com.plotsquared.core.plot.PlotAreaTerrainType; import com.plotsquared.core.plot.PlotAreaType; import com.plotsquared.core.plot.PlotId; import com.plotsquared.core.plot.world.PlotAreaManager; +import com.plotsquared.core.plot.world.SinglePlotArea; import com.plotsquared.core.queue.GlobalBlockQueue; import com.plotsquared.core.queue.QueueCoordinator; import com.plotsquared.core.setup.PlotAreaBuilder; @@ -660,7 +661,11 @@ public class Area extends SubCommand { return false; } Location center; - if (area.getType() != PlotAreaType.PARTIAL) { + if (area instanceof SinglePlotArea) { + ((SinglePlotArea) area).loadWorld(PlotId.of(0, 0)); + center = this.worldUtil.getSpawn(PlotId.of(0, 0).toSeparatedString("_")); + player.teleport(center, TeleportCause.COMMAND); + } else if (area.getType() != PlotAreaType.PARTIAL) { center = this.worldUtil.getSpawn(area.getWorldName()); player.teleport(center, TeleportCause.COMMAND); } else {