mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e4f5e1c Bump netty Pufferfish Changes: pufferfish-gg/Pufferfish@a8543a4 #33 Fix anti-xray related crash bug pufferfish-gg/Pufferfish@aefcb1a Updated Upstream (Paper)
This commit is contained in:
48
patches/server/0010-Timings-stuff.patch
Normal file
48
patches/server/0010-Timings-stuff.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 5 Jun 2020 21:30:19 -0500
|
||||
Subject: [PATCH] Timings stuff
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index 2cc44fbf8e5bd436b6d4e19f6c06b351e750cb31..fa8eb9fb4122097d2a5cb1d07f75c830ad6b2f57 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -239,10 +239,14 @@ public class TimingsExport extends Thread {
|
||||
// Information on the users Config
|
||||
|
||||
parent.put("config", createObject(
|
||||
- pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
|
||||
+ // Purpur start
|
||||
+ pair("server.properties", mapAsJSON(Bukkit.spigot().getServerProperties())),
|
||||
pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
||||
- pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Pufferfish
|
||||
- pair("pufferfish", mapAsJSON(gg.pufferfish.pufferfish.PufferfishConfig.getConfigCopy(), null)) // Pufferfish
|
||||
+ pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
|
||||
+ pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)),
|
||||
+ pair("pufferfish", mapAsJSON(gg.pufferfish.pufferfish.PufferfishConfig.getConfigCopy(), null)), // Pufferfish
|
||||
+ pair("purpur", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null))
|
||||
+ // Purpur end
|
||||
));
|
||||
|
||||
new TimingsExport(listeners, parent, history).start();
|
||||
@@ -283,6 +287,19 @@ public class TimingsExport extends Thread {
|
||||
return timingsCost;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ private static JSONObject mapAsJSON(java.util.Properties properties) {
|
||||
+ JSONObject object = new JSONObject();
|
||||
+ for (String key : properties.stringPropertyNames()) {
|
||||
+ if (key.startsWith("rcon") || key.startsWith("query") || key.equals("level-seed") || TimingsManager.hiddenConfigs.contains(key)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ object.put(key, valAsJSON(properties.get(key), key));
|
||||
+ }
|
||||
+ return object;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
private static JSONObject mapAsJSON(ConfigurationSection config, String parentKey) {
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
Reference in New Issue
Block a user