Fixed NPE when trying to tab-complete /mctop

This commit is contained in:
GJ
2013-04-15 12:52:11 -04:00
parent 3a76a111d3
commit c9a53bdaca
2 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,7 @@ public class MctopCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) {
case 1:
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
return StringUtil.copyPartialMatches(args[0], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
default:
return ImmutableList.of();
}