9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-21 15:59:28 +00:00

Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@681c013 Bundle spark (#11093)
PaperMC/Paper@5fee9c6 Move configuration option to a system property
PaperMC/Paper@aa3b356 Improve server startup logging (#11110)
PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark
PaperMC/Paper@7e91a2c Update the bundled spark version
This commit is contained in:
Dreeam
2024-07-21 07:11:14 +08:00
parent d4f0ad7103
commit a4ed88543a
125 changed files with 156 additions and 155 deletions

View File

@@ -0,0 +1,61 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Thu, 24 Nov 2022 23:39:32 +0100
Subject: [PATCH] Do not log invalid statistics
License: MIT (https://opensource.org/licenses/MIT)
Gale - https://galemc.org
This patch is based on the following patch:
"Ignore statistics warnings"
By: Aikar <aikar@aikar.co>
As part of: EmpireCraft (https://github.com/starlis/empirecraft)
Licensed under: MIT (https://opensource.org/licenses/MIT)
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
index fb7342f7a5008a283c3400c6313c637de8210dfa..a45353b8a6dd85c74d3e195f89f75f2509d579ad 100644
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
@@ -36,6 +36,7 @@ import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.datafix.DataFixTypes;
import net.minecraft.world.entity.player.Player;
import org.apache.commons.io.FileUtils;
+import org.galemc.gale.configuration.GaleGlobalConfiguration;
import org.slf4j.Logger;
public class ServerStatsCounter extends StatsCounter {
@@ -137,15 +138,15 @@ public class ServerStatsCounter extends StatsCounter {
Util.ifElse(this.getStat(statisticwrapper, s2), (statistic) -> {
this.stats.put(statistic, nbttagcompound2.getInt(s2));
}, () -> {
- ServerStatsCounter.LOGGER.warn("Invalid statistic in {}: Don't know what {} is", this.file, s2);
+ if (GaleGlobalConfiguration.get().logToConsole.invalidStatistics) ServerStatsCounter.LOGGER.warn("Invalid statistic in {}: Don't know what {} is", this.file, s2); // Gale - EMC - do not log invalid statistics
});
} else {
- ServerStatsCounter.LOGGER.warn("Invalid statistic value in {}: Don't know what {} is for key {}", new Object[]{this.file, nbttagcompound2.get(s2), s2});
+ if (GaleGlobalConfiguration.get().logToConsole.invalidStatistics) ServerStatsCounter.LOGGER.warn("Invalid statistic value in {}: Don't know what {} is for key {}", new Object[]{this.file, nbttagcompound2.get(s2), s2}); // Gale - EMC - do not log invalid statistics
}
}
}, () -> {
- ServerStatsCounter.LOGGER.warn("Invalid statistic type in {}: Don't know what {} is", this.file, s1);
+ if (GaleGlobalConfiguration.get().logToConsole.invalidStatistics) ServerStatsCounter.LOGGER.warn("Invalid statistic type in {}: Don't know what {} is", this.file, s1); // Gale - EMC - do not log invalid statistics
});
}
}
diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
index 8075e5c17f469f1bf5b7758a1334943d6ed8383f..56aa01dfbfc0817b71315322ed3f676bd62ad825 100644
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
@@ -47,4 +47,11 @@ public class GaleGlobalConfiguration extends ConfigurationPart {
public boolean verifyChatOrder = true; // Gale - Pufferfish - make chat order verification configurable
}
+
+ public LogToConsole logToConsole;
+ public class LogToConsole extends ConfigurationPart {
+
+ public boolean invalidStatistics = true; // Gale - EMC - do not log invalid statistics
+
+ }
}