2014-03-09 22:14:45 +00:00
|
|
|
From a0feb888a9a0017132f70f0fdce1b99e587c1735 Mon Sep 17 00:00:00 2001
|
2013-07-22 09:10:02 +00:00
|
|
|
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
|
2013-12-18 06:48:18 +00:00
|
|
|
index d4c1f6d..46912c8 100644
|
2013-07-22 09:10:02 +00:00
|
|
|
--- a/src/main/java/org/bukkit/conversations/Conversation.java
|
|
|
|
+++ b/src/main/java/org/bukkit/conversations/Conversation.java
|
2013-12-18 06:48:18 +00:00
|
|
|
@@ -209,6 +209,7 @@ public class Conversation {
|
2013-07-22 09:10:02 +00:00
|
|
|
* @param input The user's chat text.
|
|
|
|
*/
|
|
|
|
public void acceptInput(String input) {
|
|
|
|
+ try { // Spigot
|
|
|
|
if (currentPrompt != null) {
|
|
|
|
|
|
|
|
// Echo the user's input
|
2013-12-18 06:48:18 +00:00
|
|
|
@@ -228,6 +229,12 @@ public class Conversation {
|
2013-07-22 09:10:02 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
--
|
2013-12-18 06:48:18 +00:00
|
|
|
1.8.3.2
|
2013-07-22 09:10:02 +00:00
|
|
|
|