类 PlayerNamePrompt

java.lang.Object
org.bukkit.conversations.ValidatingPrompt
org.bukkit.conversations.PlayerNamePrompt
所有已实现的接口:
Cloneable, Prompt

public abstract class PlayerNamePrompt extends ValidatingPrompt
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。