diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2012-10-28 11:14:14 -0400 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2012-10-28 11:14:14 -0400 |
commit | 2338a4ef266ca5d9ad53a3719fcbb092f0466147 (patch) | |
tree | 3ad62b4d07f2acf19066b49b3f13877fc31f222d | |
parent | 689b9ebf2239d878a1f3b71300cf798c7eb65df9 (diff) | |
download | Essentials-2338a4ef266ca5d9ad53a3719fcbb092f0466147.tar Essentials-2338a4ef266ca5d9ad53a3719fcbb092f0466147.tar.gz Essentials-2338a4ef266ca5d9ad53a3719fcbb092f0466147.tar.lz Essentials-2338a4ef266ca5d9ad53a3719fcbb092f0466147.tar.xz Essentials-2338a4ef266ca5d9ad53a3719fcbb092f0466147.zip |
Update tppos to not accept coords over 30000000
-rw-r--r-- | Essentials/src/net/ess3/commands/Commandtppos.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandtppos.java b/Essentials/src/net/ess3/commands/Commandtppos.java index 72c16d415..e623eca62 100644 --- a/Essentials/src/net/ess3/commands/Commandtppos.java +++ b/Essentials/src/net/ess3/commands/Commandtppos.java @@ -30,6 +30,10 @@ public class Commandtppos extends EssentialsCommand { location.setPitch(Float.parseFloat(args[4])); } + if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < 30000000 || z < 30000000) + { + throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //todo: I18n + } final Trade charge = new Trade(commandName, ess); charge.isAffordableFor(user); user.sendMessage(_("teleporting")); @@ -58,6 +62,10 @@ public class Commandtppos extends EssentialsCommand { location.setPitch(Float.parseFloat(args[5])); } + if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < 30000000 || z < 30000000) + { + throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //todo: I18n + } sender.sendMessage(_("teleporting")); user.sendMessage(_("teleporting")); user.getTeleport().teleport(location, null, TeleportCause.COMMAND); |