Package org.bukkit.conversations
Interface ConversationCanceller
-
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
ExactMatchConversationCanceller
,InactivityConversationCanceller
,ManuallyAbandonedConversationCanceller
public interface ConversationCanceller extends Cloneable
A ConversationCanceller is a class that cancels an activeConversation
. A Conversation can have more than one ConversationCanceller.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
cancelBasedOnInput(ConversationContext context, String input)
Cancels a conversation based on user input.ConversationCanceller
clone()
Allows theConversationFactory
to duplicate this ConversationCanceller when creating a newConversation
.void
setConversation(Conversation conversation)
Sets the conversation this ConversationCanceller can optionally cancel.
-
-
-
Method Detail
-
setConversation
void setConversation(@NotNull Conversation conversation)
Sets the conversation this ConversationCanceller can optionally cancel.- Parameters:
conversation
- A conversation.
-
cancelBasedOnInput
boolean cancelBasedOnInput(@NotNull ConversationContext context, @NotNull String input)
Cancels a conversation based on user input.- Parameters:
context
- Context information about the conversation.input
- The input text from the user.- Returns:
- True to cancel the conversation, False otherwise.
-
clone
@NotNull ConversationCanceller clone()
Allows theConversationFactory
to duplicate this ConversationCanceller when creating a newConversation
.Implementing this method should reset any internal object state.
- Returns:
- A clone.
-
-