9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-30 12:19:13 +00:00
Files
DivineMC/divinemc-server/minecraft-patches/features/0064-Paper-PR-Fire-ServerListPingEvent-for-secondary-motd.patch
NONPLAYT d9c4e8a199 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@efc76215 Add missing copper blocks to waxables and weatherables options (#1712)
PurpurMC/Purpur@3ca0d663 Updated Upstream (Paper)
PurpurMC/Purpur@917675d0 Updated Upstream (Paper)
PurpurMC/Purpur@ffe2f809 Add option to disable Warden Sonic Boom (#1713)
2025-10-28 03:51:29 +03:00

34 lines
2.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sun, 20 Jul 2025 16:09:38 +0300
Subject: [PATCH] Paper PR: Fire ServerListPingEvent for secondary motd send
Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
Paper pull request: https://github.com/PaperMC/Paper/pull/8074
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index df4b28f16e0cd2ddcf094b8bc60f13e7707ab84b..a11f16112bbc064f5fa011574f7f495a04737374 100644
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -209,10 +209,15 @@ public abstract class PlayerList {
mutableComponent.withStyle(ChatFormatting.YELLOW);
Component joinMessage = mutableComponent; // Paper - Adventure
serverGamePacketListenerImpl.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
- ServerStatus status = this.server.getStatus();
- if (status != null && !cookie.transferred()) {
- player.sendServerStatus(status);
- }
+ // DivineMC start - Paper PR: Fire ServerListPingEvent for secondary motd send
+ if (!cookie.transferred()) {
+ io.papermc.paper.util.MCUtil.scheduleAsyncTask(() -> {
+ if (player.hasDisconnected()) return;
+ net.minecraft.network.protocol.status.ServerStatus status = com.destroystokyo.paper.network.StandardPaperServerListPingEventImpl.getEventResponse(this.server, player.connection.connection);
+ if (status != null) player.sendServerStatus(status);
+ });
+ }
+ // DivineMC end - Paper PR: Fire ServerListPingEvent for secondary motd send
// player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below
this.players.add(player);