Waterfall/Waterfall-Proxy-Patches/0035-Only-show-connection-fail-reason-when-detailed-logge.patch
2022-12-21 21:56:04 -03:00

27 lines
1.2 KiB
Diff

From 878867854391af17739c536b7db5c0992c8fcf84 Mon Sep 17 00:00:00 2001
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
Date: Tue, 15 Nov 2022 18:07:27 +0100
Subject: [PATCH] Only show connection fail reason when detailed logger is
enabled
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index f3d60253f..021fe8398 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -405,8 +405,10 @@ public final class UserConnection implements ProxiedPlayer
// FlameCord - Allow for toggle the logging of connection failures
if(FlameCord.getInstance().getFlameCordConfiguration().isLoggerDetailedConnection()) {
bungee.getLogger().log(Level.WARNING, "Error occurred processing connection for " + this.name + " " + Util.exception(cause, false)); // Waterfall
+ // FlameCord - Show connection fail reason
+ return groups.contains( "admin" ) ? cause.getMessage() : cause.getClass().getName();
}
- return ""; // Waterfall
+ return cause.getClass().getName(); // FlameCord
}
@Override
--
2.37.3.windows.1