Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.conversations.Prompt Interface Reference
Inheritance diagram for org.bukkit.conversations.Prompt:
org.bukkit.conversations.MessagePrompt org.bukkit.conversations.StringPrompt org.bukkit.conversations.ValidatingPrompt org.bukkit.conversations.BooleanPrompt org.bukkit.conversations.FixedSetPrompt org.bukkit.conversations.NumericPrompt org.bukkit.conversations.PlayerNamePrompt org.bukkit.conversations.RegexPrompt

Public Member Functions

String getPromptText (ConversationContext context)
boolean blocksForInput (ConversationContext context)
Prompt acceptInput (ConversationContext context, String input)

Static Public Attributes

static final Prompt END_OF_CONVERSATION = null

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 10 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.

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

Implemented in org.bukkit.conversations.MessagePrompt, and org.bukkit.conversations.ValidatingPrompt.

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.

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

Implemented in org.bukkit.conversations.ValidatingPrompt, org.bukkit.conversations.MessagePrompt, and org.bukkit.conversations.StringPrompt.

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.

contextContext information about the conversation.
The text to display.

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

Member Data Documentation

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

A convenience constant for indicating the end of a conversation.

Definition at line 15 of file Prompt.java.

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

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