Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
ConversationCanceller.java
1 package org.bukkit.conversations;
2 
3 /**
4  * A ConversationCanceller is a class that cancels an active {@link
5  * Conversation}. A Conversation can have more than one ConversationCanceller.
6  */
7 public interface ConversationCanceller extends Cloneable {
8 
9  /**
10  * Sets the conversation this ConversationCanceller can optionally cancel.
11  *
12  * @param conversation A conversation.
13  */
14  public void setConversation(Conversation conversation);
15 
16  /**
17  * Cancels a conversation based on user input.
18  *
19  * @param context Context information about the conversation.
20  * @param input The input text from the user.
21  * @return True to cancel the conversation, False otherwise.
22  */
23  public boolean cancelBasedOnInput(ConversationContext context, String input);
24 
25  /**
26  * Allows the {@link ConversationFactory} to duplicate this
27  * ConversationCanceller when creating a new {@link Conversation}.
28  * <p>
29  * Implementing this method should reset any internal object state.
30  *
31  * @return A clone.
32  */
34 }
void setConversation(Conversation conversation)
boolean cancelBasedOnInput(ConversationContext context, String input)