// Get the managerConversationManager conversationManager =ConversationManager.getInstance();// Get the conversationConversation conversation =conversationManager.getConversation("conversationId");// Start a conversationActiveConversation activeConv =conversation.startNewConversation(player);
Check if player is currently conversing
// Get the managerConversationManager conversationManager =ConversationManager.getInstance();// Check if player in conversationif (conversationManager.inConversation(player)) {// Do something}
Bukkit Events
ConversationStartEvent // Call when a player starts a conversationConversationUpdateStatusEvent // Call when a player change of step in a conversationConversationEndEvent // Call when a player stops being in conversation/** * You should use this event to register your own interpreters for steps, options, triggers, and conditions * Because when the plugin reloads all the interpreter is reregistered! */ConversationInterpretorLoadEvent
Get information
In some cases, you will need to get information about the configuration. For example when you need to send an instruction message to the player. Example "Sneak to end the conversation". In the config, you have an option to specify if the message will be sent