Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
MessagePrompt.java
1 package org.bukkit.conversations;
2 
3 /**
4  * MessagePrompt is the base class for any prompt that only displays a message
5  * to the user and requires no input.
6  */
7 public abstract class MessagePrompt implements Prompt{
8 
9  public MessagePrompt() {
10  super();
11  }
12 
13  /**
14  * Message prompts never wait for user input before continuing.
15  *
16  * @param context Context information about the conversation.
17  * @return Always false.
18  */
19  public boolean blocksForInput(ConversationContext context) {
20  return false;
21  }
22 
23  /**
24  * Accepts and ignores any user input, returning the next prompt in the
25  * prompt graph instead.
26  *
27  * @param context Context information about the conversation.
28  * @param input Ignored.
29  * @return The next prompt in the prompt graph.
30  */
31  public Prompt acceptInput(ConversationContext context, String input) {
32  return getNextPrompt(context);
33  }
34 
35  /**
36  * Override this method to return the next prompt in the prompt graph.
37  *
38  * @param context Context information about the conversation.
39  * @return The next prompt in the prompt graph.
40  */
41  protected abstract Prompt getNextPrompt(ConversationContext context);
42 }
abstract Prompt getNextPrompt(ConversationContext context)
Prompt acceptInput(ConversationContext context, String input)
boolean blocksForInput(ConversationContext context)