9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-22 16:29:26 +00:00

Add back Optimize entity coordinate key

This commit is contained in:
Dreeam
2024-08-07 00:53:51 +08:00
parent 791f8d11fe
commit 463fdde688
88 changed files with 14 additions and 16 deletions

View File

@@ -1,44 +0,0 @@
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 4ff3dbb9c1bcac000e4ed293cbc1a48aa1738e8f..f9647ce528d23743f687249ecaa6b51cfa3e62d2 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;
@@ -2443,7 +2444,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
+ }
+
}
}