From b234adddbb0d84c230b8a021874962ebb00d32d3 Mon Sep 17 00:00:00 2001 From: William278 Date: Wed, 22 Mar 2023 14:58:52 +0000 Subject: [PATCH] Fix teleport logic on single-server setups --- .../java/net/william278/huskhomes/teleport/Teleport.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java b/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java index 8e405242..8b48bdbe 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java @@ -111,7 +111,7 @@ public class Teleport { executeEconomyActions(); final Position target = (Position) this.target; - if (plugin.getSettings().isCrossServer() && target.getServer().equals(plugin.getServerName())) { + if (!plugin.getSettings().isCrossServer() || target.getServer().equals(plugin.getServerName())) { teleporter.teleportLocally(target, async); plugin.getLocales().getLocale("teleporting_complete") .ifPresent(teleporter::sendMessage); @@ -123,10 +123,6 @@ public class Teleport { }); } - private void teleport(@NotNull OnlineUser teleporter, @NotNull Position target) { - - } - @NotNull private Optional resolveLocalTeleporter() throws TeleportationException { if (this.teleporter instanceof Username username) {