From 225bca051678f7ef5c440b20d55925ca6fe7b6ac Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 8 Jan 2022 08:36:55 +0100 Subject: [PATCH] Ignore removal NoSuchElement --- .../src/com/comphenix/tinyprotocol/TinyProtocol.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java b/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java index c526594..658262f 100644 --- a/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java +++ b/SpigotCore_Main/src/com/comphenix/tinyprotocol/TinyProtocol.java @@ -310,7 +310,13 @@ public class TinyProtocol { } // See ChannelInjector in ProtocolLib, line 590 - channel.eventLoop().execute(() -> channel.pipeline().remove(handlerName)); + channel.eventLoop().execute(() -> { + try { + channel.pipeline().remove(handlerName); + } catch (NoSuchElementException e) { + // ignore + } + }); } public boolean hasInjected(Player player) {