Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.conversations.Prompt Interface Reference

A Prompt is the main constituent of a Conversation. More...

+ Inheritance diagram for org.bukkit.conversations.Prompt:
+ Collaboration diagram for org.bukkit.conversations.Prompt:

Public Member Functions

String getPromptText (ConversationContext context)
 Gets the text to display to the user when this prompt is first presented.
 
boolean blocksForInput (ConversationContext context)
 Checks to see if this prompt implementation should wait for user input or immediately display the next prompt.
 
Prompt acceptInput (ConversationContext context, String input)
 Accepts and processes input from the user.
 

Static Public Attributes

static final Prompt END_OF_CONVERSATION = null
 A convenience constant for indicating the end of a conversation.
 

Detailed Description

A Prompt is the main constituent of a Conversation.

Each prompt displays text to the user and optionally waits for a user's response. Prompts are chained together into a directed graph that represents the conversation flow. To halt a conversation, END_OF_CONVERSATION is returned in liu of another Prompt object.

Definition at line 8 of file Prompt.java.

Member Function Documentation

Prompt org.bukkit.conversations.Prompt.acceptInput ( ConversationContext  context,
String  input 
)

Accepts and processes input from the user.

Using the input, the next Prompt in the prompt graph is returned.

Parameters
contextContext information about the conversation.
inputThe input text from the user.
Returns
The next Prompt in the prompt graph.

Referenced by org.bukkit.conversations.Conversation.acceptInput(), and org.bukkit.conversations.Conversation.outputNextPrompt().

boolean org.bukkit.conversations.Prompt.blocksForInput ( ConversationContext  context)

Checks to see if this prompt implementation should wait for user input or immediately display the next prompt.

Parameters
contextContext information about the conversation.
Returns
If true, the Conversation will wait for input before continuing.

Referenced by org.bukkit.conversations.Conversation.outputNextPrompt().

String org.bukkit.conversations.Prompt.getPromptText ( ConversationContext  context)

Gets the text to display to the user when this prompt is first presented.

Parameters
contextContext information about the conversation.
Returns
The text to display.

Referenced by org.bukkit.conversations.Conversation.outputNextPrompt().

Member Data Documentation

final Prompt org.bukkit.conversations.Prompt.END_OF_CONVERSATION = null
static

A convenience constant for indicating the end of a conversation.

Definition at line 13 of file Prompt.java.

Referenced by org.bukkit.conversations.ConversationFactory.ConversationFactory().


The documentation for this interface was generated from the following file: