9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2026-01-04 15:31:45 +00:00

Fix 'outdated server' showing in ping before server fully boots

This commit is contained in:
MartijnMuijsers
2022-11-29 15:52:18 +01:00
parent 64638f417a
commit 8b8d3c9625
2 changed files with 27 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Optimize random calls in chunk ticking
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
This patch is based on the following patch:
"Disable Paper timings by default"
"Optimize random calls in chunk ticking"
By: Paul Sauve <paul@technove.co>
As part of: Airplane (https://github.com/TECHNOVE/Airplane)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)

View File

@@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MartijnMuijsers <martijnmuijsers@live.nl>
Date: Tue, 29 Nov 2022 15:50:22 +0100
Subject: [PATCH] Fix 'outdated server' showing in ping before server fully
boots
License: MIT (https://opensource.org/licenses/MIT)
This patch is based on the following patch:
"Fix 'outdated server' showing in ping before server fully boots"
By: William Blake Galbreath <blake.galbreath@gmail.com>
As part of: Purpur (https://github.com/PurpurMC/Purpur)
Licensed under: MIT (https://opensource.org/licenses/MIT)
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
index f90eb6c50208879c4a2d5ad7e4181c06d38076f8..c374f2baff54b5ab1c8fdc1cedcecf2126da1783 100644
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
@@ -153,6 +153,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
this.connection.send(new ClientboundStatusResponsePacket(ping));
// CraftBukkit end
*/
+ if (this.server.getStatus().getVersion() == null) return; // Gale - Purpur - fix 'outdated server' showing in ping before server fully boots - do not respond to pings before we know the protocol version
com.destroystokyo.paper.network.StandardPaperServerListPingEventImpl.processRequest(this.server, this.connection);
// Paper end
}