diff --git a/src/main/java/net/knarcraft/blacksmith/command/blacksmith/BlackSmithConfigTabCompleter.java b/src/main/java/net/knarcraft/blacksmith/command/blacksmith/BlackSmithConfigTabCompleter.java index 19087b6..35ec8a0 100644 --- a/src/main/java/net/knarcraft/blacksmith/command/blacksmith/BlackSmithConfigTabCompleter.java +++ b/src/main/java/net/knarcraft/blacksmith/command/blacksmith/BlackSmithConfigTabCompleter.java @@ -120,8 +120,9 @@ public class BlackSmithConfigTabCompleter implements TabCompleter { */ private List getCompletions(@NotNull BlacksmithSetting blacksmithSetting, @NotNull String commandValue) { - if (blacksmithSetting == BlacksmithSetting.ENCHANTMENT_BLOCK_LIST) { - return TabCompletionHelper.getStringList(getTabCompletions(SettingValueType.ENCHANTMENT), + if (blacksmithSetting == BlacksmithSetting.ENCHANTMENT_BLOCK_LIST || + blacksmithSetting == BlacksmithSetting.REFORGE_ABLE_ITEMS) { + return TabCompletionHelper.getStringList(getTabCompletions(blacksmithSetting.getValueType()), commandValue, TabCompletionHelper::filterMatchingContains); } diff --git a/src/main/java/net/knarcraft/blacksmith/command/scrapper/ScrapperConfigTabCompleter.java b/src/main/java/net/knarcraft/blacksmith/command/scrapper/ScrapperConfigTabCompleter.java index 9876700..8007d3e 100644 --- a/src/main/java/net/knarcraft/blacksmith/command/scrapper/ScrapperConfigTabCompleter.java +++ b/src/main/java/net/knarcraft/blacksmith/command/scrapper/ScrapperConfigTabCompleter.java @@ -2,6 +2,7 @@ package net.knarcraft.blacksmith.command.scrapper; import net.knarcraft.blacksmith.config.Setting; import net.knarcraft.blacksmith.config.scrapper.ScrapperSetting; +import net.knarcraft.knarlib.util.TabCompletionHelper; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -70,9 +71,14 @@ public class ScrapperConfigTabCompleter implements TabCompleter { } Setting scrapperSetting = ScrapperSetting.getSetting(commandName); if (scrapperSetting != null) { + if (scrapperSetting == ScrapperSetting.SALVAGE_ABLE_ITEMS) { + return TabCompletionHelper.getStringList(getTabCompletions(scrapperSetting.getValueType()), + commandValue, TabCompletionHelper::filterMatchingContains); + } + return filterMatchingContains(getTabCompletions(scrapperSetting.getValueType()), commandValue); } else { - return null; + return new ArrayList<>(); } }