chore: Add ip suppression if configured

Signed-off-by: ByteExceptionM <git@byteexception.eu>
This commit is contained in:
ByteExceptionM 2024-07-15 09:59:11 +02:00
parent 09fe2d8db2
commit 1c50db2ccc
No known key found for this signature in database
GPG key ID: FD580540F81A7AF5

View file

@ -67,7 +67,9 @@ public class GeyserBungeePingPassthrough implements IGeyserPingPassthrough, List
try {
event = future.get(100, TimeUnit.MILLISECONDS);
} catch (Throwable cause) {
GeyserImpl.getInstance().getLogger().error("Failed to get ping information for " + inetSocketAddress, cause);
String address = GeyserImpl.getInstance().getConfig().isLogPlayerIpAddresses() ? inetSocketAddress.toString() : "<IP address withheld>";
GeyserImpl.getInstance().getLogger().error("Failed to get ping information for " + address, cause);
return null;
}