# 类的使用
org.bukkit.conversations.ConversationFactory

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

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

  返回ConversationFactory的org.bukkit.conversations中的方法
  修饰符和类型
  方法
  说明
  `@NotNull ConversationFactory`
  ConversationFactory.`addConversationAbandonedListener(@NotNull ConversationAbandonedListener listener)`
  Adds a `ConversationAbandonedListener` to all conversations constructed by this factory.
  `@NotNull ConversationFactory`
  ConversationFactory.`thatExcludesNonPlayersWithMessage(@Nullable String playerOnlyMessage)`
  Prevents this factory from creating a conversation for non-player `Conversable` objects.
  `@NotNull ConversationFactory`
  ConversationFactory.`withConversationCanceller(@NotNull ConversationCanceller canceller)`
  Adds a `ConversationCanceller` to constructed conversations.
  `@NotNull ConversationFactory`
  ConversationFactory.`withEscapeSequence(@NotNull String escapeSequence)`
  Sets the player input that, when received, will immediately terminate the conversation.
  `@NotNull ConversationFactory`
  ConversationFactory.`withFirstPrompt(@Nullable Prompt firstPrompt)`
  Sets the first prompt to use in all generated conversations.
  `@NotNull ConversationFactory`
  ConversationFactory.`withInitialSessionData(@NotNull Map<Object,Object> initialSessionData)`
  Sets any initial data with which to populate the conversation context sessionData map.
  `@NotNull ConversationFactory`
  ConversationFactory.`withLocalEcho(boolean localEchoEnabled)`
  Sets the local echo status for all `Conversation`s created by this factory.
  `@NotNull ConversationFactory`
  ConversationFactory.`withModality(boolean modal)`
  Sets the modality of all `Conversation`s created by this factory.
  `@NotNull ConversationFactory`
  ConversationFactory.`withPrefix(@NotNull ConversationPrefix prefix)`
  Sets the `ConversationPrefix` that prepends all output from all generated conversations.
  `@NotNull ConversationFactory`
  ConversationFactory.`withTimeout(int timeoutSeconds)`
  Sets the number of inactive seconds to wait before automatically abandoning all generated conversations.