From c9a53bdaca61e5f7a8db0a341898c2820f8eea2b Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 15 Apr 2013 12:52:11 -0400 Subject: [PATCH] Fixed NPE when trying to tab-complete /mctop --- Changelog.txt | 1 + .../java/com/gmail/nossr50/commands/player/MctopCommand.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index f8ab16808..99cbc49d3 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -20,6 +20,7 @@ Version 1.4.06-dev = Fixed bug where /party chat was not working = 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 NPE when trying to tab-complete /mctop ! Changed Chimaera Wing's recipe result to use the ingredient Material ! 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. diff --git a/src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java b/src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java index 21be181af..1fb03e9a3 100644 --- a/src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java @@ -68,7 +68,7 @@ public class MctopCommand implements TabExecutor { public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) { switch (args.length) { case 1: - return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList(SkillType.SKILL_NAMES.size())); + return StringUtil.copyPartialMatches(args[0], SkillType.SKILL_NAMES, new ArrayList(SkillType.SKILL_NAMES.size())); default: return ImmutableList.of(); }