public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) { if (!this.conversationQueue.isEmpty()) { if (this.conversationQueue.getFirst() == conversation) { conversation.abandon(details); } if (this.conversationQueue.contains(conversation)) { this.conversationQueue.remove(conversation); } if (!this.conversationQueue.isEmpty()) { ((Conversation) this.conversationQueue.getFirst()).outputNextPrompt(); } } }
public synchronized void abandonAllConversations() { LinkedList oldQueue = this.conversationQueue; this.conversationQueue = new LinkedList(); Iterator var2 = oldQueue.iterator(); while (var2.hasNext()) { Conversation conversation = (Conversation) var2.next(); try { conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller())); } catch (Throwable var5) { Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", var5); } } }
@Override public void conversationAbandoned(ConversationAbandonedEvent event) { if (event.gracefulExit()) { event.getContext().getForWhom().sendRawMessage(Col.Grey() + "---------------------------"); event.getContext().getForWhom().sendRawMessage(Col.Green() + "Setup Closed" + Col.Reset()); event.getContext().getForWhom().sendRawMessage(Col.Grey() + "---------------------------"); } else { if (event.getCanceller() instanceof InactivityConversationCanceller) { event.getContext().getForWhom().sendRawMessage(ChatColor.RED + "Conversation Timed Out"); return; } if (event.getCanceller() instanceof ExactMatchConversationCanceller) { event.getContext().getForWhom().sendRawMessage(ChatColor.BLUE + "You have ended the conversation"); return; } event.getContext().getForWhom().sendRawMessage(ChatColor.RED + event.getCanceller().toString()); } }
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) { if (!conversationQueue.isEmpty()) { if (conversationQueue.getFirst() == conversation) { conversation.abandon(details); } if (conversationQueue.contains(conversation)) { conversationQueue.remove(conversation); } if (!conversationQueue.isEmpty()) { conversationQueue.getFirst().outputNextPrompt(); } } }
public synchronized void abandonAllConversations() { LinkedList<Conversation> oldQueue = conversationQueue; conversationQueue = new LinkedList<Conversation>(); for(Conversation conversation : oldQueue) { try { conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller())); } catch (Throwable t) { Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t); } } }
public synchronized void abandonAllConversations() { LinkedList<Conversation> oldQueue = conversationQueue; conversationQueue = new LinkedList<Conversation>(); for (Conversation conversation : oldQueue) { try { conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller())); } catch (Throwable t) { Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t); } } }
public synchronized void abandonAllConversations() { LinkedList<Conversation> oldQueue = conversationQueue; conversationQueue = new LinkedList<Conversation>(); for(Conversation conversation : oldQueue) { conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller())); } }
@Override public void conversationAbandoned(ConversationAbandonedEvent abandonedEvent) { this.step = 0; this.world = null; this.group = null; this.flags = null; }
@Override public void conversationAbandoned(ConversationAbandonedEvent e) { if (!e.gracefulExit()) { e.getContext().getForWhom().sendRawMessage(BasicMessage.render(Status.ERROR, "Access conversation ended")); } else { e.getContext().getForWhom().sendRawMessage(BasicMessage.render(Status.INFO, "Bye!")); } }