Bläddra i källkod

Fixed NPE when trying to tab-complete /mctop

GJ 12 år sedan
förälder
incheckning
c9a53bdaca
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 1 0
      Changelog.txt
  2. 1 1
      src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java

+ 1 - 0
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.

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java

@@ -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();
         }