001 package org.bukkit.conversations; 002 003 import org.bukkit.command.CommandSender; 004 005 /** 006 * The Conversable interface is used to indicate objects that can have 007 * conversations. 008 */ 009 public interface Conversable { 010 011 /** 012 * Tests to see of a Conversable object is actively engaged in a 013 * conversation. 014 * 015 * @return True if a conversation is in progress 016 */ 017 public boolean isConversing(); 018 019 /** 020 * Accepts input into the active conversation. If no conversation is in 021 * progress, this method does nothing. 022 * 023 * @param input The input message into the conversation 024 */ 025 public void acceptConversationInput(String input); 026 027 /** 028 * Enters into a dialog with a Conversation object. 029 * 030 * @param conversation The conversation to begin 031 * @return True if the conversation should proceed, false if it has been 032 * enqueued 033 */ 034 public boolean beginConversation(Conversation conversation); 035 036 /** 037 * Abandons an active conversation. 038 * 039 * @param conversation The conversation to abandon 040 */ 041 public void abandonConversation(Conversation conversation); 042 043 /** 044 * Abandons an active conversation. 045 * 046 * @param conversation The conversation to abandon 047 * @param details Details about why the conversation was abandoned 048 */ 049 public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details); 050 051 /** 052 * Sends this sender a message raw 053 * 054 * @param message Message to be displayed 055 */ 056 public void sendRawMessage(String message); 057 }