mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-21 15:59:28 +00:00
Make saving fireworks configurable
This commit is contained in:
45
patches/server/0053-Do-not-log-empty-message-warnings.patch
Normal file
45
patches/server/0053-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: AGPL-3.0 (https://www.gnu.org/licenses/agpl-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 63b54d47203d796b7dfeac2e6e04ce49b5a72ae5..37bf4f356a23224fb5da949e8311c895c3529cf8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -183,6 +183,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;
|
||||
|
||||
@@ -2546,7 +2547,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// 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 6b528eab517aed9c00c75b4bf6e1a7b21194c343..425206669bc13d971097ea052bffcfd6896f90d3 100644
|
||||
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
||||
+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
||||
@@ -112,6 +112,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