Class OnlinePlayersCompleter
java.lang.Object
com.ultikits.ultitools.commands.tabcomplete.OnlinePlayersCompleter
- All Implemented Interfaces:
TabCompleter
Completer that suggests online player 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 includes all online players.OnlinePlayersCompleter(boolean excludeSelf, boolean vanishedVisible) Creates a completer with custom options. -
Method Summary
Modifier and TypeMethodDescriptioncomplete(TabCompletionContext context) Generates completion suggestions based on the given context.
-
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 playervanishedVisible- whether to show vanished players
-
-
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
-