Fix /npc select with only 1 argument

This commit is contained in:
fullwall 2012-10-12 14:25:56 +08:00
parent abe5baca9c
commit 94edd7de34

View File

@ -624,7 +624,7 @@ public class NPCCommands {
@Requirements(ownership = true)
public void select(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
NPC toSelect = null;
if (args.argsLength() == 0) {
if (args.argsLength() <= 1) {
if (!(sender instanceof Player))
throw new ServerCommandException();
double range = Math.abs(args.getFlagDouble("r", 10));