From 08aa5282d4a8e42acfaba3315e2e62c54e9efc06 Mon Sep 17 00:00:00 2001 From: Kas-tle <26531652+Kas-tle@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:50:58 -0700 Subject: [PATCH] Ensure proxiedAddresses is not null before lookup (#4539) --- .../java/org/geysermc/geyser/network/netty/GeyserServer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java b/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java index f4059a9e7..db103d10e 100644 --- a/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java +++ b/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java @@ -263,7 +263,10 @@ public final class GeyserServer { ip = ""; } - ConnectionRequestEvent requestEvent = new ConnectionRequestEvent(inetSocketAddress, this.proxiedAddresses.get(inetSocketAddress)); + ConnectionRequestEvent requestEvent = new ConnectionRequestEvent( + inetSocketAddress, + this.proxiedAddresses != null ? this.proxiedAddresses.get(inetSocketAddress) : null + ); geyser.eventBus().fire(requestEvent); if (requestEvent.isCancelled()) { geyser.getLogger().debug("Connection request from " + ip + " was cancelled using the API!");