aboutsummaryrefslogtreecommitdiffhomepage
path: root/Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch')
-rw-r--r--Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch b/Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch
new file mode 100644
index 0000000000..719c9d82b6
--- /dev/null
+++ b/Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch
@@ -0,0 +1,34 @@
+From 2f79eee927b38acb5866901a7a998c2486a61609 Mon Sep 17 00:00:00 2001
+From: md_5 <[email protected]>
+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
+