2015-03-08 12:04:41 +01:00
|
|
|
From f5c4949d33fc3d140debef621a8f8cb7a0a4235a Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02: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
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|