From ee846fe05d9b22add1d79ac836897eb47099649a Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sat, 17 Jul 2021 12:01:00 +0300 Subject: [PATCH] Adjust a few catchers in the TP command Signed-off-by: BuildTools --- pom.xml | 2 +- .../java/me/william278/huskhomes2/commands/TpCommand.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 7b615911..27932d76 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.William278 HuskHomes - 2.7 + 2.7.1 jar HuskHomes diff --git a/src/main/java/me/william278/huskhomes2/commands/TpCommand.java b/src/main/java/me/william278/huskhomes2/commands/TpCommand.java index 9d0ec9b3..cbafc18a 100644 --- a/src/main/java/me/william278/huskhomes2/commands/TpCommand.java +++ b/src/main/java/me/william278/huskhomes2/commands/TpCommand.java @@ -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 [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 [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 "); } } else {