This commit is contained in:
WiIIiam278 committed 2021-06-11 10:38:26 +01:00
1 parent d2442e4433
commit df429ee99f
4 files changed
+6 -7

No files matched your search

@@ -71,10 +71,6 @@ public class TpCommand extends CommandBase {
double z = Double.parseDouble(args[2]);
String worldName = args[3];
String serverName = args[4];
if (Bukkit.getWorld(worldName) == null) {
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server>");
return;
}
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, 0F, 0F, serverName);
TeleportManager.teleportPlayer(p, teleportationPoint, connection);
} catch (Exception e) {
@@ -23,7 +23,6 @@ public class TeleportManager {
private static TeleportationPoint spawnLocation;
// todo this doesnt seem to work cross server
public static void teleportPlayer(Player player, String targetPlayer, Connection connection) throws SQLException {
DataManager.setPlayerLastPosition(player, new TeleportationPoint(player.getLocation(),
HuskHomes.getSettings().getServerID()), connection);
@@ -60,6 +59,8 @@ public class TeleportManager {
}
} catch (SQLException e) {
plugin.getLogger().log(Level.SEVERE, "An SQL exception occurred!", e);
} catch (Exception e) {
MessageManager.sendMessage(p, "error_invalid_on_arrival");
}
});
}