From fccd3ff142ebf24002de506510a93c1a928f6488 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 20 Mar 2021 12:04:36 +0100 Subject: [PATCH] Try catch --- src/de/steamwar/spectatesystem/PacketProcessor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/spectatesystem/PacketProcessor.java b/src/de/steamwar/spectatesystem/PacketProcessor.java index cbcb9d0..824e321 100644 --- a/src/de/steamwar/spectatesystem/PacketProcessor.java +++ b/src/de/steamwar/spectatesystem/PacketProcessor.java @@ -70,7 +70,11 @@ class PacketProcessor { private void runSync() { synchronized (syncList) { for(Runnable runnable : syncList) { - runnable.run(); + try{ + runnable.run(); + }catch (Exception e) { + Bukkit.getLogger().log(Level.WARNING, "Failed to execute packet", e); + } } syncList.clear(); }