diff --git a/patches/server/Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/Add-config-option-for-logging-player-ip-addresses.patch index fbc4f30888..1474e6731f 100644 --- a/patches/server/Add-config-option-for-logging-player-ip-addresses.patch +++ b/patches/server/Add-config-option-for-logging-player-ip-addresses.patch @@ -85,20 +85,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { - String s1 = "local"; + final String s1; if (connection.getRemoteAddress() != null) { - s1 = connection.getRemoteAddress().toString(); + s1 = com.destroystokyo.paper.PaperConfig.logPlayerIpAddresses ? connection.getRemoteAddress().toString() : ""; // Paper + } else { + s1 = "local"; } - - // Spigot start - spawn location event -@@ -0,0 +0,0 @@ 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 - ); - }; - }); diff --git a/patches/server/Load-Chunks-for-Login-Asynchronously.patch b/patches/server/Load-Chunks-for-Login-Asynchronously.patch index f7d37fbbac..0ee441f9b6 100644 --- a/patches/server/Load-Chunks-for-Login-Asynchronously.patch +++ b/patches/server/Load-Chunks-for-Login-Asynchronously.patch @@ -136,6 +136,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end if (nbttagcompound != null) { +@@ -0,0 +0,0 @@ public abstract class PlayerList { + if (nbttagcompound == null) player.fudgeSpawnLocation(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are.... + + player.setLevel(worldserver1); +- String s1 = "local"; ++ // Paper start - make s1 final ++ final String s1; + + if (connection.getRemoteAddress() != null) { + s1 = connection.getRemoteAddress().toString(); ++ } else { ++ s1 = "local"; + } ++ // Paper end + + // Spigot start - spawn location event + Player spawnPlayer = player.getBukkitEntity(); @@ -0,0 +0,0 @@ public abstract class PlayerList { player.getRecipeBook().sendInitialRecipeBook(player); this.updateEntireScoreboard(worldserver1.getScoreboard(), player); @@ -160,7 +177,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + playerconnection.playerJoinReady = () -> { + postChunkLoadJoin( + player, finalWorldserver, connection, playerconnection, -+ nbttagcompound, connection.getRemoteAddress().toString(), lastKnownName ++ nbttagcompound, s1, lastKnownName + ); + }; + });