From 18d1344574e4f1086cec298b38fa3794a37262db Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Sun, 17 Apr 2022 11:12:05 +0900 Subject: [PATCH] Fix SimplePacketQueue#flush isn't clearing the list --- .../azipluginmessaging/spigot/protocol/SimplePacketQueue.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spigot/src/main/java/net/azisaba/azipluginmessaging/spigot/protocol/SimplePacketQueue.java b/spigot/src/main/java/net/azisaba/azipluginmessaging/spigot/protocol/SimplePacketQueue.java index 52a4a35..5ec1c8f 100644 --- a/spigot/src/main/java/net/azisaba/azipluginmessaging/spigot/protocol/SimplePacketQueue.java +++ b/spigot/src/main/java/net/azisaba/azipluginmessaging/spigot/protocol/SimplePacketQueue.java @@ -26,5 +26,6 @@ public void flush(@NotNull PacketSender sender) { for (Map.Entry, ? extends Message> entry : list) { ((Protocol) entry.getKey()).sendPacket(sender, entry.getValue()); } + list.clear(); } }