程序包 org.bukkit.conversations

# 接口 Prompt

所有超级接口:
  `Cloneable`

所有已知实现类:
  `BooleanPrompt`, `FixedSetPrompt`, `MessagePrompt`, `NumericPrompt`, `PlayerNamePrompt`, `RegexPrompt`, `StringPrompt`, `ValidatingPrompt`

public interface Prompt extends Cloneable
A Prompt is the main constituent of a `Conversation`. Each prompt displays text to the user and optionally waits for a user's response. Prompts are chained together into a directed graph that represents the conversation flow. To halt a conversation, END_OF_CONVERSATION is returned in liu of another Prompt object.

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `static final Prompt`
  `END_OF_CONVERSATION`
  A convenience constant for indicating the end of a conversation.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable Prompt`
  `acceptInput(@NotNull ConversationContext context, @Nullable String input)`
  Accepts and processes input from the user.
  `boolean`
  `blocksForInput(@NotNull ConversationContext context)`
  Checks to see if this prompt implementation should wait for user input or immediately display the next prompt.
  `@NotNull String`
  `getPromptText(@NotNull ConversationContext context)`
  Gets the text to display to the user when this prompt is first presented.

- ## 字段详细资料

  - ### END_OF_CONVERSATION

    static final Prompt END_OF_CONVERSATION
    A convenience constant for indicating the end of a conversation.

- ## 方法详细资料

  - ### getPromptText

    @NotNull @NotNull String getPromptText(@NotNull @NotNull ConversationContext context)
    Gets the text to display to the user when this prompt is first presented.
    参数:
      `context` - Context information about the conversation.
    返回:
      The text to display.

  - ### blocksForInput

    boolean blocksForInput(@NotNull @NotNull ConversationContext context)
    Checks to see if this prompt implementation should wait for user input or immediately display the next prompt.
    参数:
      `context` - Context information about the conversation.
    返回:
      If true, the `Conversation` will wait for input before continuing. If false, `acceptInput(ConversationContext, String)` will be called immediately with `null` input.

  - ### acceptInput

    @Nullable @Nullable Prompt acceptInput(@NotNull @NotNull ConversationContext context, @Nullable @Nullable String input)
    Accepts and processes input from the user. Using the input, the next Prompt in the prompt graph is returned.
    参数:
      `context` - Context information about the conversation.
      `input` - The input text from the user.
    返回:
      The next Prompt in the prompt graph.