mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 02:10:30 +01:00
6a5e553feb
a3168ab2ce4 9b45d9fa8d3 b43a31a5c25 a926b96d5d1 d6b5ba7ca03 bb782d07aed 5a74d55c678 47b1dff3e68 [M]
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From 2bf63e41d6854c72b75337ce059dbecf5753cffc 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
|
|
|