From 9cae4d9de7188ca1f715c8a9fe485d3352ea4751 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sat, 11 Jul 2026 15:52:11 -0700 Subject: [PATCH] Fix XP command tab completion suggesting skill names for the value argument --- .../nossr50/commands/experience/ExperienceCommand.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/commands/experience/ExperienceCommand.java b/src/main/java/com/gmail/nossr50/commands/experience/ExperienceCommand.java index b3ae29991..7e63109af 100644 --- a/src/main/java/com/gmail/nossr50/commands/experience/ExperienceCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/experience/ExperienceCommand.java @@ -145,6 +145,13 @@ public abstract class ExperienceCommand implements TabExecutor { return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<>(playerNames.size())); case 2: + // Self-targeting form like '/mmoedit all 1000': when the first argument is + // already a skill (or 'all'), the next argument is a number, not a skill + if (args[0].equalsIgnoreCase("all") + || mcMMO.p.getSkillTools().matchSkill(args[0]) != null) { + return ImmutableList.of(); + } + return StringUtil.copyPartialMatches(args[1], mcMMO.p.getSkillTools().LOCALIZED_SKILL_NAMES, new ArrayList<>(mcMMO.p.getSkillTools().LOCALIZED_SKILL_NAMES.size()));