mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 15:47:44 +01:00
7b0c576798
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
From c071c8297d7e9e354716d8fd39ecc03f8f5a6d10 Mon Sep 17 00:00:00 2001
|
|
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
|
|
}
|
|
}
|
|
|
|
--
|
|
1.9.1
|
|
|