Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.conversations.PlayerNamePrompt Class Referenceabstract

PlayerNamePrompt is the base class for any prompt that requires the player to enter another player's name. More...

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

Public Member Functions

 PlayerNamePrompt (Plugin plugin)
 
- Public Member Functions inherited from org.bukkit.conversations.ValidatingPrompt
 ValidatingPrompt ()
 
Prompt acceptInput (ConversationContext context, String input)
 Accepts and processes input from the user and validates it.
 
boolean blocksForInput (ConversationContext context)
 Ensures that the prompt waits for the user to provide input.
 
- Public Member Functions inherited from org.bukkit.conversations.Prompt
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.
 

Protected Member Functions

boolean isInputValid (ConversationContext context, String input)
 Override this method to check the validity of the player's input.
 
Prompt acceptValidatedInput (ConversationContext context, String input)
 Override this method to accept and processes the validated input from the user.
 
abstract Prompt acceptValidatedInput (ConversationContext context, Player input)
 Override this method to perform some action with the user's player name response.
 
- Protected Member Functions inherited from org.bukkit.conversations.ValidatingPrompt
String getFailedValidationText (ConversationContext context, String invalidInput)
 Optionally override this method to display an additional message if the user enters an invalid input.
 

Additional Inherited Members

- Static Public Attributes inherited from org.bukkit.conversations.Prompt
static final Prompt END_OF_CONVERSATION = null
 A convenience constant for indicating the end of a conversation.
 

Detailed Description

PlayerNamePrompt is the base class for any prompt that requires the player to enter another player's name.

Definition at line 9 of file PlayerNamePrompt.java.

Constructor & Destructor Documentation

org.bukkit.conversations.PlayerNamePrompt.PlayerNamePrompt ( Plugin  plugin)

Definition at line 12 of file PlayerNamePrompt.java.

Member Function Documentation

Prompt org.bukkit.conversations.PlayerNamePrompt.acceptValidatedInput ( ConversationContext  context,
String  input 
)
protectedvirtual

Override this method to accept and processes the validated input from the user.

Using the input, the next Prompt in the prompt graph should be returned.

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

Implements org.bukkit.conversations.ValidatingPrompt.

Definition at line 24 of file PlayerNamePrompt.java.

References org.bukkit.Server.getPlayer(), and org.bukkit.plugin.Plugin.getServer().

abstract Prompt org.bukkit.conversations.PlayerNamePrompt.acceptValidatedInput ( ConversationContext  context,
Player  input 
)
protectedpure virtual

Override this method to perform some action with the user's player name response.

Parameters
contextContext information about the conversation.
inputThe user's player name response.
Returns
The next Prompt in the prompt graph.
boolean org.bukkit.conversations.PlayerNamePrompt.isInputValid ( ConversationContext  context,
String  input 
)
protectedvirtual

Override this method to check the validity of the player's input.

Parameters
contextContext information about the conversation.
inputThe player's raw console input.
Returns
True or false depending on the validity of the input.

Implements org.bukkit.conversations.ValidatingPrompt.

Definition at line 18 of file PlayerNamePrompt.java.

References org.bukkit.Server.getPlayer(), and org.bukkit.plugin.Plugin.getServer().


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