Remove requires at least one argument.

This commit is contained in:
KHobbits 2013-12-07 18:46:25 +00:00
parent 309273dc6b
commit 723e458a81

View file

@ -26,6 +26,10 @@ public class Commandremove extends EssentialsCommand
{ {
World world = user.getWorld(); World world = user.getWorld();
int radius = 0; int radius = 0;
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
if (args.length >= 2) if (args.length >= 2)
{ {
try try
@ -61,7 +65,7 @@ public class Commandremove extends EssentialsCommand
List<String> types = new ArrayList<String>(); List<String> types = new ArrayList<String>();
List<String> customTypes = 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"); types.add(0, "ALL");
} }