Class MaterialsCompleter
java.lang.Object
com.ultikits.ultitools.commands.tabcomplete.MaterialsCompleter
- All Implemented Interfaces:
TabCompleter
Completer that suggests Minecraft material names.
- 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
-