程序包 org.bukkit.conversations
package org.bukkit.conversations
致力于简化玩家与插件的直接通信的类(玩家与插件的对话,典型的场景比如操作的确认、提供插件所需数据).
-
类说明BooleanPrompt是那些需要用户判断操作是与否的提示的基类.The Conversable interface is used to indicate objects that can have conversations.The Conversation class is responsible for tracking the current state of a conversation, displaying prompts to the user, and dispatching the user's response to the appropriate place.ConversationAbandonedEvent包含一个被终止的会话的细节信息.ConversationCanceller可以用来终止一个活跃的
Conversation
.A ConversationContext provides continuity between nodes in the prompt graph by giving the developer access to the subject of the conversation and a generic map for storing values that are shared between allPrompt
invocations.A ConversationFactory is responsible for creating aConversation
from a predefined template.A ConversationPrefix implementation prepends all output from the conversation to the player.An ExactMatchConversationCanceller cancels a conversation if the user enters an exact input stringFixedSetPrompt is the base class for any prompt that requires a fixed set response from the user.An InactivityConversationCanceller will cancel aConversation
after a period of inactivity by the user.The ManuallyAbandonedConversationCanceller is only used as part of aConversationAbandonedEvent
to indicate that the conversation was manually abandoned by programmatically calling the abandon() method on it.MessagePrompt is the base class for any prompt that only displays a message to the user and requires no input.NullConversationPrefix is aConversationPrefix
implementation that displays nothing in front of conversation output.NumericPrompt is the base class for any prompt that requires aNumber
response from the user.PlayerNamePrompt is the base class for any prompt that requires the player to enter another player's name.PluginNameConversationPrefix is aConversationPrefix
implementation that displays the plugin name in front of conversation output.A Prompt is the main constituent of aConversation
.RegexPrompt is the base class for any prompt that requires an input validated by a regular expression.StringPrompt is the base class for any prompt that accepts an arbitrary string from the user.ValidatingPrompt is the base class for any prompt that requires validation.