diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-12-19 10:57:18 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-12-19 10:57:18 +0000 |
commit | 98cd03ac574b8d3fe5b6020fcc0f974f2a0d6539 (patch) | |
tree | 95a764286cda6bcfe44bc9cc1a066c857f4daa68 | |
parent | fec3b610392311a75701299c98cc6a34f2f27cf2 (diff) | |
download | Essentials-98cd03ac574b8d3fe5b6020fcc0f974f2a0d6539.tar Essentials-98cd03ac574b8d3fe5b6020fcc0f974f2a0d6539.tar.gz Essentials-98cd03ac574b8d3fe5b6020fcc0f974f2a0d6539.tar.lz Essentials-98cd03ac574b8d3fe5b6020fcc0f974f2a0d6539.tar.xz Essentials-98cd03ac574b8d3fe5b6020fcc0f974f2a0d6539.zip |
Prevent future warps being named as numbers.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java index bf5c11abe..1a7d27b4b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java @@ -20,6 +20,10 @@ public class Commandsetwarp extends EssentialsCommand { throw new NotEnoughArgumentsException(); } + + if (args[0].matches("[0-9]+")) { + throw new NotEnoughArgumentsException(); + } final Location loc = user.getLocation(); ess.getWarps().setWarp(args[0], loc); |