From 2eb8b3e2344761b863954cf1f95c478339422223 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 24 Oct 2015 02:17:19 +1300 Subject: [PATCH] Catch PacketHandler exceptions --- .../src/mineplex/core/packethandler/PacketHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java b/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java index 8d1dd5f6e..f8a05f100 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java @@ -50,7 +50,14 @@ public class PacketHandler extends MiniPlugin for (IPacketHandler handler : _packetHandlers.get(packetInfo.getPacket().getClass())) { - handler.handle(packetInfo); + try + { + handler.handle(packetInfo); + } + catch (Exception ex) + { + ex.printStackTrace(); + } } return !packetInfo.isCancelled();