Class MaterialsCompleter
java.lang.Object
com.ultikits.ultitools.commands.tabcomplete.MaterialsCompleter
- All Implemented Interfaces:
TabCompleter
Completer that suggests Minecraft material names.
建议 Minecraft 材料名称的补全器。
- Since:
- 6.2.0
- Version:
- 1.0.0
- Author:
- wisdomme
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionCreates a completer that suggests all materials.MaterialsCompleter(boolean blocksOnly, boolean itemsOnly) Creates a completer with filtering options. -
Method Summary
Modifier and TypeMethodDescriptionstatic MaterialsCompleterCreates a completer for block materials only.complete(TabCompletionContext context) Generates completion suggestions based on the given context.static MaterialsCompleterCreates a completer for item materials only.
-
Field Details
-
blocksOnly
private final boolean blocksOnly -
itemsOnly
private final boolean itemsOnly
-
-
Constructor Details
-
MaterialsCompleter
public MaterialsCompleter()Creates a completer that suggests all materials. 创建建议所有材料的补全器。 -
MaterialsCompleter
public MaterialsCompleter(boolean blocksOnly, boolean itemsOnly) Creates a completer with filtering options. 使用过滤选项创建补全器。- Parameters:
blocksOnly- only suggest block materialsitemsOnly- only suggest item materials (ignored if blocksOnly is true)
-
-
Method Details
-
complete
Description copied from interface:TabCompleterGenerates completion suggestions based on the given context. 根据给定的上下文生成补全建议。- Specified by:
completein interfaceTabCompleter- Parameters:
context- the tab completion context containing command state- Returns:
- list of suggestions, never null
-
blocksOnly
Creates a completer for block materials only. 创建仅用于方块材料的补全器。- Returns:
- a blocks-only completer
-
itemsOnly
Creates a completer for item materials only. 创建仅用于物品材料的补全器。- Returns:
- an items-only completer
-