diff options
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java b/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java index 1d770a59..30ef7d9a 100644 --- a/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java +++ b/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java @@ -1,11 +1,13 @@ package org.bukkit.craftbukkit.conversations; +import java.util.LinkedList; +import java.util.logging.Level; + +import org.bukkit.Bukkit; import org.bukkit.conversations.Conversation; import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.conversations.ManuallyAbandonedConversationCanceller; -import java.util.LinkedList; - /** */ public class ConversationTracker { @@ -42,8 +44,12 @@ public class ConversationTracker { LinkedList<Conversation> oldQueue = conversationQueue; conversationQueue = new LinkedList<Conversation>(); - for(Conversation conversation : oldQueue) { - conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller())); + 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); + } } } |