3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/server/0842-Don-t-print-component-in-resource-pack-rejection-mes.patch

20 Zeilen
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: pop4959 <pop4959@gmail.com>
Date: Fri, 1 Jul 2022 22:00:06 -0700
Subject: [PATCH] Don't print component in resource pack rejection message
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 01c252c02b7a576676a88b5f03eda4412daa3b23..bcfdbe37ed8e49fdafd0835dfaa4af4d0573840c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2035,7 +2035,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
2023-06-08 10:47:19 +02:00
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
- ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
+ ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getGameProfile().getName()); // Paper - Don't print component in resource pack rejection message
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"), org.bukkit.event.player.PlayerKickEvent.Cause.RESOURCE_PACK_REJECTION); // Paper - add cause
}
// Paper start