mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-20 15:29:30 +00:00
Rebuild
This commit is contained in:
45
patches/server/0051-Do-not-log-empty-message-warnings.patch
Normal file
45
patches/server/0051-Do-not-log-empty-message-warnings.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
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 bb143cc9bfe8ee0302955ed61c876eace149f9ca..d3319dcb15ee727b42d3bc09e06793cf728f1c6b 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;
|
||||
|
||||
@@ -2442,7 +2443,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 168e1ae2e3cd1c4f5a2c10670d79aa2a41b95635..2a42c6616e4702bb0a6dfbf4540e8c9c29c11373 100644
|
||||
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
||||
+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
||||
@@ -89,6 +89,11 @@ 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
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user