9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-22 16:29:26 +00:00
Files
Gale/gale-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch
Dreeam 964f16ffa2 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@336ea9d Check for empty when sending equipment changes (#12008)
PaperMC/Paper@939bb78 Add RayTraceConfigurationBuilder (#11907)
PaperMC/Paper@81bb82f Fix wrong piston world border check (#12007)
PaperMC/Paper@ce95b5d Use proper default for setting null display background color (#12010)
PaperMC/Paper@2477f1f [ci/skip] fix and improvements for docs in ConsumeEffect component (#11998)
PaperMC/Paper@fb5b173 Add PlayerClientLoadedWorldEvent (#11940)
PaperMC/Paper@3af5e77 Add Player#give (#11995)
PaperMC/Paper@7e21cb8 fix PlayerChangedMainHandEvent javadoc (#12020)
2025-01-27 13:00:12 -05:00

22 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Thu, 24 Nov 2022 23:45:57 +0100
Subject: [PATCH] Do not log empty message warnings
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f4708bd41f4036faf48e3916ec5675ec43eff394..b56b41e696adc5f2485439676402e6084265aedd 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2486,7 +2486,7 @@ public class ServerGamePacketListenerImpl
// CraftBukkit start
String rawMessage = message.signedContent();
if (rawMessage.isEmpty()) {
- LOGGER.warn("{} tried to send an empty message", this.player.getScoreboardName());
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.chat.emptyMessageWarning) LOGGER.warn("{} tried to send an empty message", this.player.getScoreboardName()); // Gale - do not log empty message warnings
} else if (this.getCraftPlayer().isConversing()) {
final String conversationInput = rawMessage;
this.server.processQueue.add(() -> ServerGamePacketListenerImpl.this.getCraftPlayer().acceptConversationInput(conversationInput));