Skip to content

Commit

Permalink
Fix Plugin Message API Disconnects
Browse files Browse the repository at this point in the history
  • Loading branch information
md-5 authored and SpigotMC committed Jan 19, 2014
1 parent 29f93da commit 5fc0216
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,15 @@ public void dispatchIncomingMessage(Player source, String channel, byte[] messag
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
}
}

Expand Down

0 comments on commit 5fc0216

Please sign in to comment.