类 InactivityConversationCanceller
java.lang.Object
org.bukkit.conversations.InactivityConversationCanceller
- 所有已实现的接口:
Cloneable
,ConversationCanceller
An InactivityConversationCanceller will cancel a
Conversation
after
a period of inactivity by the user.-
字段概要
-
构造器概要
构造器说明InactivityConversationCanceller
(Plugin plugin, int timeoutSeconds) Creates an InactivityConversationCanceller. -
方法概要
修饰符和类型方法说明boolean
cancelBasedOnInput
(ConversationContext context, String input) 根据用户的输入反馈取消一个会话.protected void
cancelling
(Conversation conversation) Subclasses of InactivityConversationCanceller can override this method to take additional actions when the inactivity timer abandons the conversation.clone()
允许某一ConversationFactory
在创建一个新Conversation
时 复制这个ConversationCanceller.void
setConversation
(Conversation conversation) 设置本ConversationCanceller可以取消的会话.
-
字段详细资料
-
plugin
-
timeoutSeconds
protected int timeoutSeconds -
conversation
-
-
构造器详细资料
-
InactivityConversationCanceller
Creates an InactivityConversationCanceller.- 参数:
plugin
- The owning plugin.timeoutSeconds
- The number of seconds of inactivity to wait.
-
-
方法详细资料
-
setConversation
从接口复制的说明:ConversationCanceller
设置本ConversationCanceller可以取消的会话.原文:Sets the conversation this ConversationCanceller can optionally cancel.
- 指定者:
setConversation
在接口中ConversationCanceller
- 参数:
conversation
- 一个会话
-
cancelBasedOnInput
从接口复制的说明:ConversationCanceller
根据用户的输入反馈取消一个会话.原文:Cancels a conversation based on user input.
- 指定者:
cancelBasedOnInput
在接口中ConversationCanceller
- 参数:
context
- 关于会话的Context信息input
- 用户的输入值- 返回:
- true取消该会话,false反之
-
clone
从接口复制的说明:ConversationCanceller
允许某一ConversationFactory
在创建一个新Conversation
时 复制这个ConversationCanceller.实现这个方法应当重置一切内部的对象状态.
原文:Allows the
ConversationFactory
to duplicate this ConversationCanceller when creating a newConversation
.Implementing this method should reset any internal object state.
- 指定者:
clone
在接口中ConversationCanceller
- 覆盖:
clone
在类中Object
- 返回:
- 一个副本
-
cancelling
Subclasses of InactivityConversationCanceller can override this method to take additional actions when the inactivity timer abandons the conversation.- 参数:
conversation
- The conversation being abandoned.
-