Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.conversations.NumericPrompt Class Referenceabstract
Inheritance diagram for org.bukkit.conversations.NumericPrompt:
org.bukkit.conversations.ValidatingPrompt org.bukkit.conversations.Prompt

Protected Member Functions

boolean isInputValid (ConversationContext context, String input)
 
boolean isNumberValid (ConversationContext context, Number input)
 
Prompt acceptValidatedInput (ConversationContext context, String input)
 
abstract Prompt acceptValidatedInput (ConversationContext context, Number input)
 
String getFailedValidationText (ConversationContext context, String invalidInput)
 
String getInputNotNumericText (ConversationContext context, String invalidInput)
 
String getFailedValidationText (ConversationContext context, Number invalidInput)
 
- Protected Member Functions inherited from org.bukkit.conversations.ValidatingPrompt
abstract boolean isInputValid (ConversationContext context, String input)
 
abstract Prompt acceptValidatedInput (ConversationContext context, String input)
 
String getFailedValidationText (ConversationContext context, String invalidInput)
 

Additional Inherited Members

- Public Member Functions inherited from org.bukkit.conversations.ValidatingPrompt
Prompt acceptInput (ConversationContext context, String input)
 
boolean blocksForInput (ConversationContext context)
 
- Public Member Functions inherited from org.bukkit.conversations.Prompt
String getPromptText (ConversationContext context)
 
- Static Public Attributes inherited from org.bukkit.conversations.Prompt
static final Prompt END_OF_CONVERSATION = null
 

Detailed Description

NumericPrompt is the base class for any prompt that requires a Number response from the user.

Definition at line 9 of file NumericPrompt.java.

Member Function Documentation

abstract Prompt org.bukkit.conversations.NumericPrompt.acceptValidatedInput ( ConversationContext  context,
Number  input 
)
abstractprotected

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

Parameters
contextContext information about the conversation.
inputThe user's response as a Number.
Returns
The next Prompt in the prompt graph.
String org.bukkit.conversations.NumericPrompt.getFailedValidationText ( ConversationContext  context,
Number  invalidInput 
)
protected

Optionally override this method to display an additional message if the user enters an invalid numeric input.

Parameters
contextContext information about the conversation.
invalidInputThe invalid input provided by the user.
Returns
A message explaining how to correct the input.

Definition at line 80 of file NumericPrompt.java.

80  {
81  return null;
82  }
String org.bukkit.conversations.NumericPrompt.getInputNotNumericText ( ConversationContext  context,
String  invalidInput 
)
protected

Optionally override this method to display an additional message if the user enters an invalid number.

Parameters
contextContext information about the conversation.
invalidInputThe invalid input provided by the user.
Returns
A message explaining how to correct the input.

Definition at line 68 of file NumericPrompt.java.

68  {
69  return null;
70  }
boolean org.bukkit.conversations.NumericPrompt.isNumberValid ( ConversationContext  context,
Number  input 
)
protected

Override this method to do further validation on the numeric player input after the input has been determined to actually be a number.

Parameters
contextContext information about the conversation.
inputThe number the player provided.
Returns
The validity of the player's input.

Definition at line 27 of file NumericPrompt.java.

27  {
28  return true;
29  }

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