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: 932e97f3 Rename to AsyncPlayerSendSuggestionsEvent to be consistent in naming 0dd19075 AsyncSendPlayerSuggestionsEvent Brigadier Event a9e20e5f Fix being kicked in survival for block picking - Fixes #3277 4d20537e Expose game version (#3274) 85fb0015 Validate PickItem Packet and kick for invalid - Fixes #3256 5729bc71 Special case Keep Alive packets from Anti Xray a76b7740 Improved oversized chunk data packet handling a6f78170 Use Vanilla Bed Search for non players (Villagers) 68fb98b5 Fix 2 plugin specific issues with loot drop and pathfinders 6e41f7b7 Update Activation Range 2.0 with more villager controls 57dd3971 Updated Upstream (Bukkit/CraftBukkit)
78 lines
3.0 KiB
Diff
78 lines
3.0 KiB
Diff
From 23500f1f8f5d8e17be4b8e14b2ec52638b2db889 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 93d5a3f9..5e7e10c8 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 c3fb1c27..79543106 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1396,6 +1396,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
|
|
|