From 8761feb93f6dc0af2ee83f2eb7addcbc73e23cb8 Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 19 Dec 2011 11:53:34 +0100 Subject: More null checks for Jails --- Essentials/src/com/earth2me/essentials/Jails.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 4c1090c5c..f8ab2d02e 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -59,7 +59,12 @@ public class Jails extends AsyncStorageObjectHolder Date: Mon, 19 Dec 2011 10:57:18 +0000 Subject: Prevent future warps being named as numbers. --- Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3