# 接口的使用
org.bukkit.conversations.Prompt

使用Prompt的程序包
程序包
说明
org.bukkit.conversations
致力于简化玩家与插件的直接通信的类(玩家与插件的对话，典型的场景比如操作的确认、提供插件所需数据).

- ## org.bukkit.conversations中Prompt的使用

  实现Prompt的org.bukkit.conversations中的类
  修饰符和类型
  类
  说明
  `class`
  `BooleanPrompt`
  BooleanPrompt是那些需要用户判断操作是与否的提示的基类.
  `class`
  `FixedSetPrompt`
  FixedSetPrompt is the base class for any prompt that requires a fixed set response from the user.
  `class`
  `MessagePrompt`
  MessagePrompt is the base class for any prompt that only displays a message to the user and requires no input.
  `class`
  `NumericPrompt`
  NumericPrompt is the base class for any prompt that requires a `Number` response from the user.
  `class`
  `PlayerNamePrompt`
  PlayerNamePrompt is the base class for any prompt that requires the player to enter another player's name.
  `class`
  `RegexPrompt`
  RegexPrompt is the base class for any prompt that requires an input validated by a regular expression.
  `class`
  `StringPrompt`
  StringPrompt is the base class for any prompt that accepts an arbitrary string from the user.
  `class`
  `ValidatingPrompt`
  ValidatingPrompt is the base class for any prompt that requires validation.
  声明为Prompt的org.bukkit.conversations中的字段
  修饰符和类型
  字段
  说明
  `protected Prompt`
  Conversation.`currentPrompt`
  `static final Prompt`
  Prompt.`END_OF_CONVERSATION`
  A convenience constant for indicating the end of a conversation.
  `protected Prompt`
  ConversationFactory.`firstPrompt`
  返回Prompt的org.bukkit.conversations中的方法
  修饰符和类型
  方法
  说明
  `@Nullable Prompt`
  MessagePrompt.`acceptInput(@NotNull ConversationContext context, @Nullable String input)`
  Accepts and ignores any user input, returning the next prompt in the prompt graph instead.
  `@Nullable Prompt`
  Prompt.`acceptInput(@NotNull ConversationContext context, @Nullable String input)`
  Accepts and processes input from the user.
  `@Nullable Prompt`
  ValidatingPrompt.`acceptInput(@NotNull ConversationContext context, @Nullable String input)`
  Accepts and processes input from the user and validates it.
  `protected abstract @Nullable Prompt`
  BooleanPrompt.`acceptValidatedInput(@NotNull ConversationContext context, boolean input)`
  您可以重写这个方法，根据用户对提示的响应来执行对应的操作.
  `protected @Nullable Prompt`
  BooleanPrompt.`acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input)`
  `protected abstract @Nullable Prompt`
  NumericPrompt.`acceptValidatedInput(@NotNull ConversationContext context, @NotNull Number input)`
  Override this method to perform some action with the user's integer response.
  `protected @Nullable Prompt`
  NumericPrompt.`acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input)`
  `protected @Nullable Prompt`
  PlayerNamePrompt.`acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input)`
  `protected abstract @Nullable Prompt`
  PlayerNamePrompt.`acceptValidatedInput(@NotNull ConversationContext context, @NotNull Player input)`
  Override this method to perform some action with the user's player name response.
  `protected abstract @Nullable Prompt`
  ValidatingPrompt.`acceptValidatedInput(@NotNull ConversationContext context, @NotNull String input)`
  Override this method to accept and processes the validated input from the user.
  `protected abstract @Nullable Prompt`
  MessagePrompt.`getNextPrompt(@NotNull ConversationContext context)`
  Override this method to return the next prompt in the prompt graph.
  参数类型为Prompt的org.bukkit.conversations中的方法
  修饰符和类型
  方法
  说明
  `@NotNull ConversationFactory`
  ConversationFactory.`withFirstPrompt(@Nullable Prompt firstPrompt)`
  Sets the first prompt to use in all generated conversations.
  参数类型为Prompt的org.bukkit.conversations中的构造器
  限定符
  构造器
  说明
  ``
  `Conversation(@Nullable Plugin plugin, @NotNull Conversable forWhom, @Nullable Prompt firstPrompt)`
  Initializes a new Conversation.
  ``
  `Conversation(@Nullable Plugin plugin, @NotNull Conversable forWhom, @Nullable Prompt firstPrompt, @NotNull Map<Object,Object> initialSessionData)`
  Initializes a new Conversation.