Fixes some bugs
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
Fixes some config commands not being registered Bumps KnarLib version to include bug-fix Fixes and improves tab-completion for enchantment block-list
This commit is contained in:
@@ -3,6 +3,7 @@ package net.knarcraft.blacksmith.command.blacksmith;
|
||||
import net.knarcraft.blacksmith.config.SettingValueType;
|
||||
import net.knarcraft.blacksmith.config.blacksmith.BlacksmithSetting;
|
||||
import net.knarcraft.blacksmith.util.InputParsingHelper;
|
||||
import net.knarcraft.knarlib.util.TabCompletionHelper;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
@@ -53,7 +54,7 @@ public class BlackSmithConfigTabCompleter implements TabCompleter {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,6 +120,11 @@ public class BlackSmithConfigTabCompleter implements TabCompleter {
|
||||
*/
|
||||
private List<String> getCompletions(@NotNull BlacksmithSetting blacksmithSetting,
|
||||
@NotNull String commandValue) {
|
||||
if (blacksmithSetting == BlacksmithSetting.ENCHANTMENT_BLOCK_LIST) {
|
||||
return TabCompletionHelper.getStringList(getTabCompletions(SettingValueType.ENCHANTMENT),
|
||||
commandValue, TabCompletionHelper::filterMatchingContains);
|
||||
}
|
||||
|
||||
List<String> returnValues = filterMatchingContains(
|
||||
getTabCompletions(blacksmithSetting.getValueType()), commandValue);
|
||||
if (blacksmithSetting == BlacksmithSetting.BASE_PRICE ||
|
||||
|
Reference in New Issue
Block a user