diff --git a/src/main/java/de/btegermany/terraplusminus/commands/TpllCommand.java b/src/main/java/de/btegermany/terraplusminus/commands/TpllCommand.java index 573922b..4c7421a 100644 --- a/src/main/java/de/btegermany/terraplusminus/commands/TpllCommand.java +++ b/src/main/java/de/btegermany/terraplusminus/commands/TpllCommand.java @@ -121,8 +121,6 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command World tpWorld = player.getWorld(); - int xOffset = Terraplusminus.config.getInt("terrain_offset.x"); - int zOffset = Terraplusminus.config.getInt("terrain_offset.z"); double minLat = Terraplusminus.config.getDouble("min_latitude"); double maxLat = Terraplusminus.config.getDouble("max_latitude"); double minLon = Terraplusminus.config.getDouble("min_longitude"); @@ -179,8 +177,8 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command tpWorld = Bukkit.getWorld(nextServer.getWorldName()); height = height - yOffset + nextServer.getOffset(); player.sendMessage(Terraplusminus.config.getString("prefix") + "§7Teleporting to " + coordinates[1] + ", " + coordinates[0] + " in another world. This may take a bit..."); - //player.teleport(new Location(tpWorld, mcCoordinates[0] + xOffset, height, mcCoordinates[1] + zOffset, player.getLocation().getYaw(), player.getLocation().getPitch())); - PaperLib.teleportAsync(player, new Location(tpWorld, mcCoordinates[0] + xOffset, height, mcCoordinates[1] + zOffset, player.getLocation().getYaw(), player.getLocation().getPitch())); + //player.teleport(new Location(tpWorld, mcCoordinates[0], height, mcCoordinates[1], player.getLocation().getYaw(), player.getLocation().getPitch())); + PaperLib.teleportAsync(player, new Location(tpWorld, mcCoordinates[0], height, mcCoordinates[1], player.getLocation().getYaw(), player.getLocation().getPitch())); return true; } } else { @@ -201,7 +199,7 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command tpWorld = Bukkit.getWorld(previousServer.getWorldName()); height = height - yOffset + previousServer.getOffset(); player.sendMessage(Terraplusminus.config.getString("prefix") + "§7Teleporting to " + coordinates[1] + ", " + coordinates[0] + " in another world. This may take a bit..."); - PaperLib.teleportAsync(player, new Location(tpWorld, mcCoordinates[0] + xOffset, height, mcCoordinates[1] + zOffset, player.getLocation().getYaw(), player.getLocation().getPitch())); + PaperLib.teleportAsync(player, new Location(tpWorld, mcCoordinates[0], height, mcCoordinates[1], player.getLocation().getYaw(), player.getLocation().getPitch())); return true; } } else {