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

Paper Changes:
PaperMC/Paper@bf5852a Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268)
PaperMC/Paper@fb53074 Apply optimise collision checking in move packet handling patch
PaperMC/Paper@81bfda8 [ci skip] Specify rebase location in CONTRIBUTING (#11255)
PaperMC/Paper@9571983 Fix scanForLegacyEnderDragon world config (#11262)
PaperMC/Paper@ec55c11 Fix indestructable light blocks (#11275)
PaperMC/Paper@1b8ab11 Add Configuration for vertical Despawn Ranges (#10440)
PaperMC/Paper@534ab86 [ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)
PaperMC/Paper@e619744 Allow skipping of world symlink validation (#11250)
PaperMC/Paper@78216fe Re-implement portalCreateRadius world config (#11267)
PaperMC/Paper@4829fbf Handle custom registry elements properly (#11230)
PaperMC/Paper@d5ffc57 Implement more methods for horse inventories (#11147)
PaperMC/Paper@52ae4ad Migrate ArmorStand meta to using entity tag (#11107)
2024-08-17 00:12:29 +00:00

45 lines
2.6 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/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d82481fed75609930dd8d5f59e14076b1bc54b97..959ad817b4fc969a2fc7e7b64ca05e5ae5fecac4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -194,6 +194,7 @@ import net.minecraft.world.phys.shapes.BooleanOp;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
+import org.apache.commons.lang3.StringUtils;
import org.galemc.gale.configuration.GaleGlobalConfiguration;
import org.slf4j.Logger;
@@ -2510,7 +2511,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// CraftBukkit start
String s = message.signedContent();
if (s.isEmpty()) {
- ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message");
+ if (GaleGlobalConfiguration.get().logToConsole.chat.emptyMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message"); // Gale - do not log empty message warnings
} else if (this.getCraftPlayer().isConversing()) {
final String conversationInput = s;
this.server.processQueue.add(new Runnable() {
diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
index 56aa01dfbfc0817b71315322ed3f676bd62ad825..8ef64ac15626633ecdba555b39a20da11d917b65 100644
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
@@ -53,5 +53,10 @@ public class GaleGlobalConfiguration extends ConfigurationPart {
public boolean invalidStatistics = true; // Gale - EMC - do not log invalid statistics
+ public Chat chat;
+ public class Chat extends ConfigurationPart {
+ public boolean emptyMessageWarning = false; // Gale - do not log empty message warnings
+ }
+
}
}