Class MaterialsCompleter

java.lang.Object
com.ultikits.ultitools.commands.tabcomplete.MaterialsCompleter
All Implemented Interfaces:
TabCompleter

public class MaterialsCompleter extends Object implements TabCompleter
Completer that suggests Minecraft material names.

建议 Minecraft 材料名称的补全器。

Since:
6.2.0
Version:
1.0.0
Author:
wisdomme
  • 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 materials
      itemsOnly - only suggest item materials (ignored if blocksOnly is true)
  • Method Details

    • complete

      public List<String> complete(TabCompletionContext context)
      Description copied from interface: TabCompleter
      Generates completion suggestions based on the given context. 根据给定的上下文生成补全建议。
      Specified by:
      complete in interface TabCompleter
      Parameters:
      context - the tab completion context containing command state
      Returns:
      list of suggestions, never null
    • blocksOnly

      public static MaterialsCompleter blocksOnly()
      Creates a completer for block materials only. 创建仅用于方块材料的补全器。
      Returns:
      a blocks-only completer
    • itemsOnly

      public static MaterialsCompleter itemsOnly()
      Creates a completer for item materials only. 创建仅用于物品材料的补全器。
      Returns:
      an items-only completer