类 NumericPrompt
Number 响应的提示的基类。-
字段概要
从接口继承的字段 org.bukkit.conversations.Prompt
END_OF_CONVERSATION -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明acceptValidatedInput(@NotNull ConversationContext context, @NotNull Number input) 覆盖此方法以对用户的整数响应执行某些操作。acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input) 覆盖此方法以接受并处理来自用户的验证输入。getFailedValidationText(@NotNull ConversationContext context, @NotNull Number invalidInput) 可选择覆盖此方法以在用户输入无效数字输入时显示额外消息。getFailedValidationText(@NotNull ConversationContext context, @NotNull String invalidInput) 可选择覆盖此方法以在用户输入无效输入时显示额外消息。getInputNotNumericText(@NotNull ConversationContext context, @NotNull String invalidInput) 可选择覆盖此方法以在用户输入无效数字时显示额外消息。protected booleanisInputValid(@NotNull ConversationContext context, @NotNull String input) 覆盖此方法以检查玩家输入的有效性。protected booleanisNumberValid(@NotNull ConversationContext context, @NotNull Number input) 覆盖此方法以在输入被确定为数字后对数字玩家输入进行进一步验证。从类继承的方法 org.bukkit.conversations.ValidatingPrompt
acceptInput, blocksForInput从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.bukkit.conversations.Prompt
getPromptText
-
构造器详细资料
-
NumericPrompt
public NumericPrompt()
-
-
方法详细资料
-
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。
-
isNumberValid
protected boolean isNumberValid(@NotNull @NotNull ConversationContext context, @NotNull @NotNull Number input) 覆盖此方法以在输入被确定为数字后对数字玩家输入进行进一步验证。原文: Override this method to do further validation on the numeric player input after the input has been determined to actually be a number.
- 参数:
context- 关于对话的上下文信息。input- 玩家提供的数字。- 返回:
- 玩家输入的有效性。
-
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 Number input) 覆盖此方法以对用户的整数响应执行某些操作。原文: Override this method to perform some action with the user's integer response.
-
getFailedValidationText
@Nullable protected @Nullable String getFailedValidationText(@NotNull @NotNull ConversationContext context, @NotNull @NotNull String invalidInput) 从类复制的说明:ValidatingPrompt可选择覆盖此方法以在用户输入无效输入时显示额外消息。原文: Optionally override this method to display an additional message if the user enters an invalid input.
- 覆盖:
getFailedValidationText在类中ValidatingPrompt- 参数:
context- 关于对话的上下文信息。invalidInput- 用户提供的无效输入。- 返回:
- 解释如何纠正输入的消息。
-
getInputNotNumericText
@Nullable protected @Nullable String getInputNotNumericText(@NotNull @NotNull ConversationContext context, @NotNull @NotNull String invalidInput) 可选择覆盖此方法以在用户输入无效数字时显示额外消息。原文: Optionally override this method to display an additional message if the user enters an invalid number.
- 参数:
context- 关于对话的上下文信息。invalidInput- 用户提供的无效输入。- 返回:
- 解释如何纠正输入的消息。
-
getFailedValidationText
@Nullable protected @Nullable String getFailedValidationText(@NotNull @NotNull ConversationContext context, @NotNull @NotNull Number invalidInput) 可选择覆盖此方法以在用户输入无效数字输入时显示额外消息。原文: Optionally override this method to display an additional message if the user enters an invalid numeric input.
- 参数:
context- 关于对话的上下文信息。invalidInput- 用户提供的无效输入。- 返回:
- 解释如何纠正输入的消息。
-