Adjust a few catchers in the TP command

Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
BuildTools committed 2021-07-17 12:01:00 +03:00
1 parent 6afd19156a
commit ee846fe05d
2 files changed
+4 -4

No files matched your search

@@ -42,7 +42,7 @@ public class TpCommand extends CommandBase {
double z = Double.parseDouble(args[2]);
TeleportationPoint teleportationPoint = new TeleportationPoint(p.getWorld().getName(), x, y, z, 0F, 0F, HuskHomes.getSettings().getServerID());
TeleportManager.teleportPlayer(p, teleportationPoint, connection);
} catch (Exception e) {
} catch (NumberFormatException e) {
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
}
return;
@@ -58,7 +58,7 @@ public class TpCommand extends CommandBase {
}
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, 0F, 0F, HuskHomes.getSettings().getServerID());
TeleportManager.teleportPlayer(p, teleportationPoint, connection);
} catch (Exception e) {
} catch (NumberFormatException e) {
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
}
return;
@@ -72,7 +72,7 @@ public class TpCommand extends CommandBase {
String serverName = args[4];
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, 0F, 0F, serverName);
TeleportManager.teleportPlayer(p, teleportationPoint, connection);
} catch (Exception e) {
} catch (NumberFormatException e) {
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server>");
}
} else {