mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: a4f066cc Fix method profiler inbalance introduced in a2a9ffe (#3132) c65dcad3 Don't delay chunk unloads during entity ticking bc17ce69 Delay unsafe actions until after entity ticking is done - Fixes #3114 5553e6b3 Disable Sync Events firing Async errors during shutdown e12c51d9 Use better variable for isStopping() API 586ee2bb Remove patch for MC-111480, fixed in 1.14 09a94215 Remove streams from Mob AI System bb5c294e Fix Disabling Asynchronous Chunks 089d8356 Implement Chunk Priority / Urgency System for World Gen fce69af7 Use dedicated thread for main thread blocking chunk loads 588b62e4 Add tick times API and /mspt command (#3102) 11de41c7 Add API MinecraftServer#isStopping (#3129) 942ff3c2 My patches are under MIT (#3130)
78 lines
3.0 KiB
Diff
78 lines
3.0 KiB
Diff
From 748ec8f720ad952d784ed4e3931d4c9a9de1c17c Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Tue, 18 Feb 2020 20:30:03 -0600
|
|
Subject: [PATCH] Purpur config files
|
|
|
|
---
|
|
.../java/co/aikar/timings/TimingsExport.java | 23 ++++++++++++++++---
|
|
src/main/java/org/bukkit/Server.java | 12 ++++++++++
|
|
2 files changed, 32 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
index 93d5a3f97..5e7e10c8f 100644
|
|
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
|
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
@@ -204,9 +204,13 @@ class TimingsExport extends Thread {
|
|
// Information on the users Config
|
|
|
|
parent.put("config", createObject(
|
|
- pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
|
|
- pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
|
- pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null))
|
|
+ // Purpur start
|
|
+ pair("server.properties", mapAsJSON(Bukkit.spigot().getServerProperties())),
|
|
+ pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
|
+ pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
|
|
+ pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)),
|
|
+ pair("purpur", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null))
|
|
+ // Purpur end
|
|
));
|
|
|
|
new TimingsExport(listeners, parent, history).start();
|
|
@@ -247,6 +251,19 @@ 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 (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();
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index 9ceaac0e8..20fe14213 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1386,6 +1386,18 @@ public interface Server extends PluginMessageRecipient {
|
|
}
|
|
// Paper end
|
|
|
|
+ // Purpur start
|
|
+ @NotNull
|
|
+ public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig() {
|
|
+ throw new UnsupportedOperationException("Not supported yet.");
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ public java.util.Properties getServerProperties() {
|
|
+ throw new UnsupportedOperationException("Not supported yet.");
|
|
+ }
|
|
+ // Purpur end
|
|
+
|
|
/**
|
|
* Sends the component to the player
|
|
*
|
|
--
|
|
2.24.0
|
|
|