mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 00:09:25 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@8fd3a67 [ci skip] Clean up book limits patch (#11297) PaperMC/Paper@dae906b Add getWorld method that uses adventure Key (#11199) PaperMC/Paper@ba1b016 Allow server administrators to disable book size checks (#10457) PaperMC/Paper@a8cb8e6 [ci skip] Fix JavaDocs for HeightMap#MOTION_BLOCKING_NO_LEAVES (#11291) PaperMC/Paper@e4b38b4 Fixup config parsing PaperMC/Paper@3271119 Fix SculkBloomEvent firing for block entity loading (#11306)
45 lines
2.6 KiB
Diff
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 67240d108f1fcbc3eb8b7840798e833d511cd46e..401b738d3b0aa1e102a00a68840b8f5eda21a427 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;
|
|
|
|
@@ -2514,7 +2515,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
|
|
+ }
|
|
+
|
|
}
|
|
}
|