001 package org.bukkit.conversations; 002 003 /** 004 * MessagePrompt is the base class for any prompt that only displays a message 005 * to the user and requires no input. 006 */ 007 public abstract class MessagePrompt implements Prompt{ 008 009 public MessagePrompt() { 010 super(); 011 } 012 013 /** 014 * Message prompts never wait for user input before continuing. 015 * 016 * @param context Context information about the conversation. 017 * @return Always false. 018 */ 019 public boolean blocksForInput(ConversationContext context) { 020 return false; 021 } 022 023 /** 024 * Accepts and ignores any user input, returning the next prompt in the 025 * prompt graph instead. 026 * 027 * @param context Context information about the conversation. 028 * @param input Ignored. 029 * @return The next prompt in the prompt graph. 030 */ 031 public Prompt acceptInput(ConversationContext context, String input) { 032 return getNextPrompt(context); 033 } 034 035 /** 036 * Override this method to return the next prompt in the prompt graph. 037 * 038 * @param context Context information about the conversation. 039 * @return The next prompt in the prompt graph. 040 */ 041 protected abstract Prompt getNextPrompt(ConversationContext context); 042 }