类 PlayerNamePrompt
java.lang.Object
org.bukkit.conversations.ValidatingPrompt
org.bukkit.conversations.PlayerNamePrompt
PlayerNamePrompt 是任何需要玩家输入另一个玩家名称的提示的基类。
-
字段概要
从接口继承的字段 org.bukkit.conversations.Prompt
END_OF_CONVERSATION -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input) 覆盖此方法以接受并处理来自用户的验证输入。acceptValidatedInput(@NotNull ConversationContext context, @NotNull Player input) 覆盖此方法以对用户的玩家名称响应执行某些操作。protected booleanisInputValid(@NotNull ConversationContext context, @NotNull String input) 覆盖此方法以检查玩家输入的有效性。从类继承的方法 org.bukkit.conversations.ValidatingPrompt
acceptInput, blocksForInput, getFailedValidationText从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.bukkit.conversations.Prompt
getPromptText
-
构造器详细资料
-
PlayerNamePrompt
-
-
方法详细资料
-
isInputValid
protected boolean isInputValid(@NotNull @NotNull ConversationContext context, @NotNull @NotNull String input) 从类复制的说明:ValidatingPrompt覆盖此方法以检查玩家输入的有效性。原文: Override this method to check the validity of the player's input.
- 指定者:
isInputValid在类中ValidatingPrompt- 参数:
context- 关于对话的上下文信息。input- 玩家的原始控制台输入。- 返回:
- 根据输入的有效性返回 true 或 false。
-
acceptValidatedInput
@Nullable protected @Nullable Prompt acceptValidatedInput(@NotNull @NotNull ConversationContext context, @NotNull @NotNull String input) 从类复制的说明:ValidatingPrompt覆盖此方法以接受并处理来自用户的验证输入。使用输入,应返回提示图中的下一个 Prompt。原文: Override this method to accept and processes the validated input from the user. Using the input, the next Prompt in the prompt graph should be returned.
- 指定者:
acceptValidatedInput在类中ValidatingPrompt- 参数:
context- 关于对话的上下文信息。input- 来自用户的验证输入文本。- 返回:
- 提示图中的下一个 Prompt。
-
acceptValidatedInput
@Nullable protected abstract @Nullable Prompt acceptValidatedInput(@NotNull @NotNull ConversationContext context, @NotNull @NotNull Player input) 覆盖此方法以对用户的玩家名称响应执行某些操作。原文: Override this method to perform some action with the user's player name response.
- 参数:
context- 关于对话的上下文信息。input- 用户的玩家名称响应。- 返回:
- 提示图中的下一个
Prompt。
-