Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.conversations.ExactMatchConversationCanceller Class Reference
Inheritance diagram for org.bukkit.conversations.ExactMatchConversationCanceller:
org.bukkit.conversations.ConversationCanceller

Public Member Functions

 ExactMatchConversationCanceller (String escapeSequence)
 
void setConversation (Conversation conversation)
 
boolean cancelBasedOnInput (ConversationContext context, String input)
 
ConversationCanceller clone ()
 

Detailed Description

An ExactMatchConversationCanceller cancels a conversation if the user enters an exact input string

Definition at line 7 of file ExactMatchConversationCanceller.java.

Constructor & Destructor Documentation

org.bukkit.conversations.ExactMatchConversationCanceller.ExactMatchConversationCanceller ( String  escapeSequence)

Builds an ExactMatchConversationCanceller.

Parameters
escapeSequenceThe string that, if entered by the user, will cancel the conversation.

Definition at line 16 of file ExactMatchConversationCanceller.java.

Referenced by org.bukkit.conversations.ExactMatchConversationCanceller.clone().

16  {
17  this.escapeSequence = escapeSequence;
18  }

Member Function Documentation

boolean org.bukkit.conversations.ExactMatchConversationCanceller.cancelBasedOnInput ( ConversationContext  context,
String  input 
)

Cancels a conversation based on user input.

Parameters
contextContext information about the conversation.
inputThe input text from the user.
Returns
True to cancel the conversation, False otherwise.

Implements org.bukkit.conversations.ConversationCanceller.

Definition at line 22 of file ExactMatchConversationCanceller.java.

22  {
23  return input.equals(escapeSequence);
24  }
ConversationCanceller org.bukkit.conversations.ExactMatchConversationCanceller.clone ( )

Allows the ConversationFactory to duplicate this ConversationCanceller when creating a new Conversation.

Implementing this method should reset any internal object state.

Returns
A clone.

Implements org.bukkit.conversations.ConversationCanceller.

Definition at line 26 of file ExactMatchConversationCanceller.java.

References org.bukkit.conversations.ExactMatchConversationCanceller.ExactMatchConversationCanceller().

26  {
27  return new ExactMatchConversationCanceller(escapeSequence);
28  }
void org.bukkit.conversations.ExactMatchConversationCanceller.setConversation ( Conversation  conversation)

Sets the conversation this ConversationCanceller can optionally cancel.

Parameters
conversationA conversation.

Implements org.bukkit.conversations.ConversationCanceller.

Definition at line 20 of file ExactMatchConversationCanceller.java.

20 {}

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