diff options
author | md_5 <git@md-5.net> | 2017-11-10 10:44:27 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-11-10 10:46:46 +1100 |
commit | 353964045a14a76bb83f67626af21c7b593e29e2 (patch) | |
tree | da65aa178ad9494172e76d0ef48e3d92f9e98960 | |
parent | 326c2e605ff591232c7f3372299cddaa1513dd9b (diff) | |
download | craftbukkit-353964045a14a76bb83f67626af21c7b593e29e2.tar craftbukkit-353964045a14a76bb83f67626af21c7b593e29e2.tar.gz craftbukkit-353964045a14a76bb83f67626af21c7b593e29e2.tar.lz craftbukkit-353964045a14a76bb83f67626af21c7b593e29e2.tar.xz craftbukkit-353964045a14a76bb83f67626af21c7b593e29e2.zip |
Catch all exceptions from plugin conversation handling
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java b/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java index 30ef7d9a..eefa68a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java +++ b/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java @@ -55,7 +55,15 @@ public class ConversationTracker { public synchronized void acceptConversationInput(String input) { if (isConversing()) { - conversationQueue.getFirst().acceptInput(input); + Conversation conversation = conversationQueue.getFirst(); + try { + conversation.acceptInput(input); + } catch (Throwable t) { + conversation.getContext().getPlugin().getLogger().log(Level.WARNING, + String.format("Plugin %s generated an exception whilst handling conversation input", + conversation.getContext().getPlugin().getDescription().getFullName() + ), t); + } } } |