程序包 org.bukkit.conversations

# 类 ConversationAbandonedEvent

java.lang.Object
java.util.EventObject
org.bukkit.conversations.ConversationAbandonedEvent

所有已实现的接口:
  `Serializable`

public class ConversationAbandonedEvent extends EventObject
ConversationAbandonedEvent包含一个被终止的会话的细节信息.

另请参阅:
  - 序列化表格

- ## 字段概要

  ### 从类继承的字段 java.util.EventObject

  `source`

- ## 构造器概要

  构造器
  构造器
  说明
  `ConversationAbandonedEvent(@NotNull Conversation conversation)`
  `ConversationAbandonedEvent(@NotNull Conversation conversation, @Nullable ConversationCanceller canceller)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable ConversationCanceller`
  `getCanceller()`
  获取终止该会话的`ConversationCanceller`.
  `@NotNull ConversationContext`
  `getContext()`
  获取这个被终止的会话的上下文.
  `boolean`
  `gracefulExit()`
  指示该对话是怎样被终止的 - 在对话提示流程完成后自然终止 还是较早地通过`ConversationCanceller`终止.

  ### 从类继承的方法 java.util.EventObject

  `getSource, toString`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 构造器详细资料

  - ### ConversationAbandonedEvent

    public ConversationAbandonedEvent(@NotNull @NotNull Conversation conversation)

  - ### ConversationAbandonedEvent

    public ConversationAbandonedEvent(@NotNull @NotNull Conversation conversation, @Nullable @Nullable ConversationCanceller canceller)

- ## 方法详细资料

  - ### getCanceller

    @Nullable public @Nullable ConversationCanceller getCanceller()
    获取终止该会话的`ConversationCanceller`.

    原文:Gets the object that caused the conversation to be abandoned.

    返回:
      终止该会话的`ConversationCanceller`

  - ### getContext

    @NotNull public @NotNull ConversationContext getContext()
    获取这个被终止的会话的上下文.

    原文:Gets the abandoned conversation's conversation context.

    返回:
      被终止的对话的上下文

  - ### gracefulExit

    public boolean gracefulExit()
    指示该对话是怎样被终止的 - 在对话提示流程完成后自然终止 还是较早地通过`ConversationCanceller`终止.

    Indicates how the conversation was abandoned - naturally as part of the prompt chain or prematurely via a `ConversationCanceller`.

    返回:
      若会话是由于`Prompt`返回了空值或下一个prompt被优雅地终止返回true; 若会话是被ConversationCanceller终止的返回false.