From 975f2e5104b961f491ed2dde97de12d1cbb50d1f Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Fri, 8 Oct 2021 00:30:52 -0700 Subject: [PATCH] Filter ip address on join if setting is true (#6748) --- ...onfig-option-for-logging-player-ip-addresses.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/server/0820-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0820-Add-config-option-for-logging-player-ip-addresses.patch index 3b9bef6b01..5a1474c00e 100644 --- a/patches/server/0820-Add-config-option-for-logging-player-ip-addresses.patch +++ b/patches/server/0820-Add-config-option-for-logging-player-ip-addresses.patch @@ -81,7 +81,7 @@ index 01fee879c946b6640da34d5890d686f0152437dc..494ca8fa8c742d4eac9fb11878d3b317 @Override diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index ad9fb50791779a5fe7d22268b71bd10d9c9ff3f0..84b4b900e14628fddbaae6b00300929773df43a8 100644 +index ad9fb50791779a5fe7d22268b71bd10d9c9ff3f0..ea1f7c8bf220982a086d4ae1663ae445b8c6cebd 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -237,7 +237,7 @@ public abstract class PlayerList { @@ -93,3 +93,12 @@ index ad9fb50791779a5fe7d22268b71bd10d9c9ff3f0..84b4b900e14628fddbaae6b003009297 } // Spigot start - spawn location event +@@ -301,7 +301,7 @@ public abstract class PlayerList { + playerconnection.playerJoinReady = () -> { + postChunkLoadJoin( + player, finalWorldserver, connection, playerconnection, +- nbttagcompound, connection.getRemoteAddress().toString(), lastKnownName ++ nbttagcompound, com.destroystokyo.paper.PaperConfig.logPlayerIpAddresses ? connection.getRemoteAddress().toString() : "", lastKnownName // Paper + ); + }; + });