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

Public Member Functions

 FixedSetPrompt (String...fixedSet)
- 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)

Protected Member Functions

boolean isInputValid (ConversationContext context, String input)
String formatFixedSet ()
- 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)

Protected Attributes

List< String > fixedSet

Additional Inherited Members

- Static Public Attributes inherited from org.bukkit.conversations.Prompt
static final Prompt END_OF_CONVERSATION = null

Detailed Description

FixedSetPrompt is the base class for any prompt that requires a fixed set response from the user.

Definition at line 12 of file FixedSetPrompt.java.

Constructor & Destructor Documentation

org.bukkit.conversations.FixedSetPrompt.FixedSetPrompt ( String...  fixedSet)

Creates a FixedSetPrompt from a set of strings.

foo = new FixedSetPrompt("bar", "cheese", "panda");

fixedSetA fixed set of strings, one of which the user must type.

Definition at line 24 of file FixedSetPrompt.java.

24  {
25  super();
26  this.fixedSet = Arrays.asList(fixedSet);
27  }

Member Function Documentation

String org.bukkit.conversations.FixedSetPrompt.formatFixedSet ( )

Utility function to create a formatted string containing all the options declared in the constructor.

the options formatted like "[bar, cheese, panda]" if bar, cheese, and panda were the options used

Definition at line 43 of file FixedSetPrompt.java.

43  {
44  return "[" + StringUtils.join(fixedSet, ", ") + "]";
45  }

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