geforkt von Mirrors/Paper
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
35 Zeilen
1.1 KiB
Diff
35 Zeilen
1.1 KiB
Diff
From bd775c3569e6cd82d7100a37d2f3c697fe879ab9 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
|
|
}
|
|
|
|
/**
|
|
--
|
|
2.1.0
|
|
|