mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Remove Tuinity patches (you will be missed)
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
From bb9d00d17399d52be12b31df4b9a29c10c196ea8 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 | 25 ++++++++++++++++---
|
||||
src/main/java/org/bukkit/Server.java | 12 +++++++++
|
||||
2 files changed, 33 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index cb92d7b21..41dc89d99 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -204,10 +204,14 @@ 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)), // Tuinity - add config to timings report
|
||||
- pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report
|
||||
+ // Purpur start
|
||||
+ pair("server.properties", mapAsJSON(Bukkit.spigot().getServerProperties())),
|
||||
+ pair("bukkit.yml", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
||||
+ pair("spigot.yml", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
|
||||
+ pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report
|
||||
+ pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)), // Tuinity - add config to timings report
|
||||
+ pair("purpur.yml", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null))
|
||||
+ // Purpur end
|
||||
));
|
||||
|
||||
new TimingsExport(listeners, parent, history).start();
|
||||
@@ -248,6 +252,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 55ec8d2d0..d85c215e4 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1379,6 +1379,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
}
|
||||
// Tuinity end - add config to timings report
|
||||
|
||||
+ // 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
|
||||
|
||||
Reference in New Issue
Block a user