Paper/Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch
Zach Brown cab333b217 Rebase (Update) from upstream SpigotMC
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e
Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c
Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66
Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b
Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
2014-11-28 14:19:07 -06:00

35 lines
1.1 KiB
Diff

From 3f83f75a73d1b8bb56a888fedcc12c26706481b8 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 22 Jul 2013 19:09:43 +1000
Subject: [PATCH] Catch Conversation API Errors
diff --git a/src/main/java/org/bukkit/conversations/Conversation.java b/src/main/java/org/bukkit/conversations/Conversation.java
index d4c1f6d..46912c8 100644
--- a/src/main/java/org/bukkit/conversations/Conversation.java
+++ b/src/main/java/org/bukkit/conversations/Conversation.java
@@ -209,6 +209,7 @@ public class Conversation {
* @param input The user's chat text.
*/
public void acceptInput(String input) {
+ try { // Spigot
if (currentPrompt != null) {
// Echo the user's input
@@ -228,6 +229,12 @@ public class Conversation {
currentPrompt = currentPrompt.acceptInput(context, input);
outputNextPrompt();
}
+ // Spigot Start
+ } catch ( Throwable t )
+ {
+ org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.SEVERE, "Error handling conversation prompt", t );
+ }
+ // Spigot End
}
/**
--
1.9.1