Downgrade to latest working paper 1.20.1 for now so we can still do work

This commit is contained in:
Cryptite
2023-10-03 09:22:05 -05:00
parent f3b7b86532
commit bc3711ebf3
7 changed files with 40 additions and 22 deletions

View File

@@ -18,7 +18,7 @@ index 97c6f1c622af02b3761b23a4d3a67b385e45ea84..7f059a71d25170e8e3215c7d91ab7927
}
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
index 8afd9b785fb8734255e3ea926b8375bb9cae60be..5a0ccc7e08ecba5dc62c02195c5f87c22ea6d122 100644
index 8afd9b785fb8734255e3ea926b8375bb9cae60be..9bd42eac43f068df8f7f49249bb47840d87d799a 100644
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
@@ -45,7 +45,7 @@ public class ServerStatsCounter extends StatsCounter {
@@ -30,12 +30,11 @@ index 8afd9b785fb8734255e3ea926b8375bb9cae60be..5a0ccc7e08ecba5dc62c02195c5f87c2
this.server = server;
this.file = file;
// Spigot start
@@ -55,7 +55,14 @@ public class ServerStatsCounter extends StatsCounter {
@@ -55,7 +55,13 @@ public class ServerStatsCounter extends StatsCounter {
this.stats.put( wrapper, entry.getValue().intValue() );
}
// Spigot end
- if (file.isFile()) {
+
+ // Slice start - If event supplies stats, use it. Otherwise just load from disk as usual
+ com.destroystokyo.paper.event.player.PlayerLoadStatsEvent event = new com.destroystokyo.paper.event.player.PlayerLoadStatsEvent(uuid);
+ org.bukkit.Bukkit.getPluginManager().callEvent(event);
@@ -46,7 +45,7 @@ index 8afd9b785fb8734255e3ea926b8375bb9cae60be..5a0ccc7e08ecba5dc62c02195c5f87c2
try {
this.parseLocal(server.getFixerUpper(), FileUtils.readFileToString(file));
} catch (IOException ioexception) {
@@ -103,46 +110,8 @@ public class ServerStatsCounter extends StatsCounter {
@@ -103,46 +109,8 @@ public class ServerStatsCounter extends StatsCounter {
if (!jsonelement.isJsonNull()) {
CompoundTag nbttagcompound = ServerStatsCounter.fromJson(jsonelement.getAsJsonObject());
@@ -95,7 +94,7 @@ index 8afd9b785fb8734255e3ea926b8375bb9cae60be..5a0ccc7e08ecba5dc62c02195c5f87c2
}
ServerStatsCounter.LOGGER.error("Unable to parse Stat data from {}", this.file);
@@ -167,6 +136,48 @@ public class ServerStatsCounter extends StatsCounter {
@@ -167,6 +135,48 @@ public class ServerStatsCounter extends StatsCounter {
}