mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
Catch all exceptions from plugin conversation handling
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d87e31cf51
commit
b6ce01dac8
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue