2015-03-08 12:04:41 +01:00
|
|
|
From b49464f5caf99a002acfa85c3cc56bdbee4f0477 Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Sat, 19 Oct 2013 12:59:42 +1100
|
|
|
|
Subject: [PATCH] Fix Plugin Message API Disconnects
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
|
|
|
|
index a906f8d..4c171e8 100644
|
|
|
|
--- a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
|
|
|
|
+++ b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
|
|
|
|
@@ -421,7 +421,15 @@ public class StandardMessenger implements Messenger {
|
|
|
|
Set<PluginMessageListenerRegistration> registrations = getIncomingChannelRegistrations(channel);
|
|
|
|
|
|
|
|
for (PluginMessageListenerRegistration registration : registrations) {
|
|
|
|
- registration.getListener().onPluginMessageReceived(channel, source, message);
|
|
|
|
+ // Spigot Start
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ registration.getListener().onPluginMessageReceived( channel, source, message );
|
|
|
|
+ } catch ( Throwable t )
|
|
|
|
+ {
|
|
|
|
+ org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.WARNING, "Could not pass incoming plugin message to " + registration.getPlugin(), t );
|
|
|
|
+ }
|
|
|
|
+ // Spigot End
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|