程序包 org.bukkit.conversations

# 类 InactivityConversationCanceller

java.lang.Object
org.bukkit.conversations.InactivityConversationCanceller

所有已实现的接口:
  `Cloneable`, `ConversationCanceller`

public class InactivityConversationCanceller extends Object implements ConversationCanceller
An InactivityConversationCanceller will cancel a `Conversation` after a period of inactivity by the user.

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `protected Conversation`
  `conversation`
  `protected Plugin`
  `plugin`
  `protected int`
  `timeoutSeconds`

- ## 构造器概要

  构造器
  构造器
  说明
  `InactivityConversationCanceller(@NotNull Plugin plugin, int timeoutSeconds)`
  Creates an InactivityConversationCanceller.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `boolean`
  `cancelBasedOnInput(@NotNull ConversationContext context, @NotNull String input)`
  根据用户的输入反馈取消一个会话.
  `protected void`
  `cancelling(@NotNull Conversation conversation)`
  Subclasses of InactivityConversationCanceller can override this method to take additional actions when the inactivity timer abandons the conversation.
  `@NotNull ConversationCanceller`
  `clone()`
  允许某一`ConversationFactory`在创建一个新`Conversation`时 复制这个ConversationCanceller.
  `void`
  `setConversation(@NotNull Conversation conversation)`
  设置本ConversationCanceller可以取消的会话.

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

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

- ## 字段详细资料

  - ### plugin

    protected Plugin plugin

  - ### timeoutSeconds

    protected int timeoutSeconds

  - ### conversation

    protected Conversation conversation

- ## 构造器详细资料

  - ### InactivityConversationCanceller

    public InactivityConversationCanceller(@NotNull @NotNull Plugin plugin, int timeoutSeconds)
    Creates an InactivityConversationCanceller.
    参数:
      `plugin` - The owning plugin.
      `timeoutSeconds` - The number of seconds of inactivity to wait.

- ## 方法详细资料

  - ### setConversation

    public void setConversation(@NotNull @NotNull Conversation conversation)
    从接口复制的说明: `ConversationCanceller`
    设置本ConversationCanceller可以取消的会话.

    原文:Sets the conversation this ConversationCanceller can optionally cancel.

    指定者:
      `setConversation` 在接口中 `ConversationCanceller`
    参数:
      `conversation` - 一个会话

  - ### cancelBasedOnInput

    public boolean cancelBasedOnInput(@NotNull @NotNull ConversationContext context, @NotNull @NotNull String input)
    从接口复制的说明: `ConversationCanceller`
    根据用户的输入反馈取消一个会话.

    原文:Cancels a conversation based on user input.

    指定者:
      `cancelBasedOnInput` 在接口中 `ConversationCanceller`
    参数:
      `context` - 关于会话的Context信息
      `input` - 用户的输入值
    返回:
      true取消该会话，false反之

  - ### clone

    @NotNull public @NotNull ConversationCanceller clone()
    从接口复制的说明: `ConversationCanceller`
    允许某一`ConversationFactory`在创建一个新`Conversation`时 复制这个ConversationCanceller.

    实现这个方法应当重置一切内部的对象状态.

    原文:Allows the `ConversationFactory` to duplicate this ConversationCanceller when creating a new `Conversation`.

    Implementing this method should reset any internal object state.

    指定者:
      `clone` 在接口中 `ConversationCanceller`
    覆盖:
      `clone` 在类中 `Object`
    返回:
      一个副本

  - ### cancelling

    protected void cancelling(@NotNull @NotNull Conversation conversation)
    Subclasses of InactivityConversationCanceller can override this method to take additional actions when the inactivity timer abandons the conversation.
    参数:
      `conversation` - The conversation being abandoned.