mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-20 23:39:29 +00:00
33 lines
2.4 KiB
Diff
33 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MartijnMuijsers <martijnmuijsers@live.nl>
|
|
Date: Fri, 25 Nov 2022 15:07:55 +0100
|
|
Subject: [PATCH] Do not log expired message warnings
|
|
|
|
License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index 426a7fd3df09aa34967ab7707959ea7e037381fb..497ff02924047f0d876ffca7aaa1ceb21084a8f7 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -2610,7 +2610,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
}
|
|
|
|
if (message.hasExpiredServer(Instant.now())) {
|
|
- ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), message.signedContent().plain(), message.timeStamp().getEpochSecond(), Instant.now().getEpochSecond()); // Paper
|
|
+ if (GaleGlobalConfiguration.get().logToConsole.chat.expiredMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), message.signedContent().plain(), message.timeStamp().getEpochSecond(), Instant.now().getEpochSecond()); // Paper // Gale - do not log expired message warnings
|
|
}
|
|
|
|
return true;
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
|
index 0f276a6a3521e97afbb20ea5421a16180f626d45..6c6f9fabb208baf5419c5dd6290b83a7d983c6d7 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
|
@@ -65,6 +65,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart {
|
|
public Chat chat;
|
|
public class Chat extends ConfigurationPart {
|
|
public boolean emptyMessageWarning = false; // Gale - do not log empty message warnings
|
|
+ public boolean expiredMessageWarning = false; // Gale - do not log expired message warnings
|
|
}
|
|
|
|
}
|