3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 21:40:08 +01:00
Paper/Bukkit-Patches/0014-Catch-Conversation-API-Errors.patch

35 Zeilen
1.1 KiB
Diff

2013-12-18 07:48:18 +01:00
From 8c588a47e59db68d802c08d47f9be97bc4c5e09a 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
2013-12-18 07:48:18 +01:00
index d4c1f6d..46912c8 100644
--- a/src/main/java/org/bukkit/conversations/Conversation.java
+++ b/src/main/java/org/bukkit/conversations/Conversation.java
2013-12-18 07:48:18 +01:00
@@ -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
2013-12-18 07:48:18 +01:00
@@ -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
}
/**
--
2013-12-18 07:48:18 +01:00
1.8.3.2