Fix teleport logic on single-server setups

This commit is contained in:
William278 committed 2023-03-22 14:58:52 +00:00
1 parent 9578bfdc9c
commit b234adddbb
1 file changed
+1 -5
@@ -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<OnlineUser> resolveLocalTeleporter() throws TeleportationException {
if (this.teleporter instanceof Username username) {