summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-12-07 18:46:25 +0000
committerKHobbits <rob@khobbits.co.uk>2013-12-07 18:46:25 +0000
commit723e458a81ae17db5d635c273a055afa141131ff (patch)
tree2f666dbe862707e906caa825387bbdc2d4af0f97
parent309273dc6b63c54359617825e82f76a41dc4569a (diff)
downloadEssentials-723e458a81ae17db5d635c273a055afa141131ff.tar
Essentials-723e458a81ae17db5d635c273a055afa141131ff.tar.gz
Essentials-723e458a81ae17db5d635c273a055afa141131ff.tar.lz
Essentials-723e458a81ae17db5d635c273a055afa141131ff.tar.xz
Essentials-723e458a81ae17db5d635c273a055afa141131ff.zip
Remove requires at least one argument.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandremove.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
index 429276962..9136d2037 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
@@ -26,6 +26,10 @@ public class Commandremove extends EssentialsCommand
{
World world = user.getWorld();
int radius = 0;
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
if (args.length >= 2)
{
try
@@ -61,7 +65,7 @@ public class Commandremove extends EssentialsCommand
List<String> types = new ArrayList<String>();
List<String> customTypes = new ArrayList<String>();
- if (args.length > 0 && (args[0].contentEquals("*") || args[0].contentEquals("all")))
+ if (args[0].contentEquals("*") || args[0].contentEquals("all"))
{
types.add(0, "ALL");
}