From a1a2959f0303795e791e2d772a531f170d71947c Mon Sep 17 00:00:00 2001 From: BlueTree242 Date: Mon, 22 Apr 2024 15:50:40 +0200 Subject: [PATCH] Wrap firing ServerCustomPayloadEvent in ensureInEventLoop --- .../protocol/java/JavaCustomPayloadTranslator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaCustomPayloadTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaCustomPayloadTranslator.java index af8713bb5..9344ee947 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaCustomPayloadTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaCustomPayloadTranslator.java @@ -141,8 +141,10 @@ public class JavaCustomPayloadTranslator extends PacketTranslator { + EventBus eventBus = session.getGeyser().eventBus(); + eventBus.fire(new ServerCustomPayloadEvent(session, channel, packet.getData())); + }); } }