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

@ -20,6 +20,7 @@ Version 1.4.06-dev
= Fixed bug where /party chat was not working = Fixed bug where /party chat was not working
= Fixed bug where experience commands were adding levels to all skills when they shouldn't = Fixed bug where experience commands were adding levels to all skills when they shouldn't
= Fixed mcmmo.commands.ptp.send not being set by default = Fixed mcmmo.commands.ptp.send not being set by default
= Fixed NPE when trying to tab-complete /mctop
! Changed Chimaera Wing's recipe result to use the ingredient Material ! Changed Chimaera Wing's recipe result to use the ingredient Material
! Players will no longer pickup items to their hotbar while using Unarmed ! Players will no longer pickup items to their hotbar while using Unarmed
! ExperienceAPI methods will now throw InvalidSkillException if the skill name passed in is invalid. ! ExperienceAPI methods will now throw InvalidSkillException if the skill name passed in is invalid.

View File

@ -68,7 +68,7 @@ public class MctopCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: 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: default:
return ImmutableList.of(); return ImmutableList.of();
} }