mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: ad708dd3 Add option to allow iron golems to spawn in air (Closes #1965, Closes #1851) b16fd5c3 Updated Upstream (Bukkit/CraftBukkit/Spigot)
84 lines
3.3 KiB
Diff
84 lines
3.3 KiB
Diff
From 713489b865ff4aa3f8597b6415fe0b345156c504 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 | 24 ++++++++++++++++---
|
|
src/main/java/org/bukkit/Server.java | 17 +++++++++++++
|
|
2 files changed, 38 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
index 93d5a3f9..b5111928 100644
|
|
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
|
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
@@ -204,9 +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))
|
|
+ // 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.yml", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)),
|
|
+ pair("tuinity.yml", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)),
|
|
+ pair("purpur.yml", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null))
|
|
+ // Purpur end
|
|
));
|
|
|
|
new TimingsExport(listeners, parent, history).start();
|
|
@@ -247,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 80f9abdc..739182ef 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1371,6 +1371,23 @@ public interface Server extends PluginMessageRecipient {
|
|
}
|
|
// Paper end
|
|
|
|
+ // Purpur start
|
|
+ @NotNull
|
|
+ public org.bukkit.configuration.file.YamlConfiguration getTuinityConfig() {
|
|
+ throw new UnsupportedOperationException("Not supported yet.");
|
|
+ }
|
|
+
|
|
+ @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
|
|
|