Class OnlinePlayersCompleter

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

public class OnlinePlayersCompleter extends Object implements TabCompleter
Completer that suggests online player names.

建议在线玩家名称的补全器。

Since:
6.2.0
Version:
1.0.0
Author:
wisdomme
  • Field Details

    • excludeSelf

      private final boolean excludeSelf
    • vanishedVisible

      private final boolean vanishedVisible
  • Constructor Details

    • OnlinePlayersCompleter

      public OnlinePlayersCompleter()
      Creates a completer that includes all online players. 创建包含所有在线玩家的补全器。
    • OnlinePlayersCompleter

      public OnlinePlayersCompleter(boolean excludeSelf, boolean vanishedVisible)
      Creates a completer with custom options. 使用自定义选项创建补全器。
      Parameters:
      excludeSelf - whether to exclude the requesting player
      vanishedVisible - whether to show vanished players
  • 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