mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Add tuinity.yml and server.properties to timings config tab
This commit is contained in:
@@ -1,25 +1,78 @@
|
||||
From 2cab1732fb9596bf2c2b692f3f018dd51609596f Mon Sep 17 00:00:00 2001
|
||||
From 3c223fc899501579d3656f7e73da79b195c59f39 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
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/Server.java | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
.../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 93d5a3f97..b5111928d 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 98e7ba900..765f8059a 100644
|
||||
index 98e7ba900..bea600c65 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1331,6 +1331,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1331,6 +1331,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
|
||||
+
|
||||
/**
|
||||
|
||||
@@ -1,27 +1,17 @@
|
||||
From 31d3ec5ad187df9a8a60c212260a729abc029703 Mon Sep 17 00:00:00 2001
|
||||
From c9e3dae6773177302297c61c55d0bbbe9f1c6f9c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 18 Feb 2020 20:38:26 -0600
|
||||
Subject: [PATCH] Host our own timings
|
||||
|
||||
---
|
||||
src/main/java/co/aikar/timings/TimingsExport.java | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
src/main/java/co/aikar/timings/TimingsExport.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index 93d5a3f97..a4ae730da 100644
|
||||
index b5111928d..63d21ddbc 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -206,7 +206,8 @@ class TimingsExport extends Thread {
|
||||
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))
|
||||
+ pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)),
|
||||
+ pair("purpur", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null)) // Purpur
|
||||
));
|
||||
|
||||
new TimingsExport(listeners, parent, history).start();
|
||||
@@ -283,7 +284,7 @@ class TimingsExport extends Thread {
|
||||
@@ -301,7 +301,7 @@ class TimingsExport extends Thread {
|
||||
String response = null;
|
||||
String timingsURL = null;
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From edf1d2066b94a4e52c17e326ace3b64289ecee8b Mon Sep 17 00:00:00 2001
|
||||
From 7237c98d2466a3bbbf909eced8c728aa5242fdcf Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 30 Jan 2020 00:41:08 -0600
|
||||
Subject: [PATCH] Add tick times API
|
||||
@@ -39,10 +39,10 @@ index 50415189c..8fbda2aee 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index e0d207d73..6be24c16c 100644
|
||||
index 0c45c9af3..75bf097ed 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1420,4 +1420,21 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1430,4 +1430,21 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
int getCurrentTick();
|
||||
// Paper end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 598786fbe7fa753987cb8593d89e16758f118fc6 Mon Sep 17 00:00:00 2001
|
||||
From ab2f131fdd232bd09bedb76172d48ca5f6458435 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 26 May 2019 15:18:40 -0500
|
||||
Subject: [PATCH] Bring back server name
|
||||
@@ -29,10 +29,10 @@ index 8fbda2aee..a2cf8e29b 100644
|
||||
* Get a sample of the servers last tick times (in nanos)
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 6be24c16c..6690ef00c 100644
|
||||
index 75bf097ed..89100f3f5 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1422,6 +1422,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1432,6 +1432,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
// Paper end
|
||||
|
||||
// Purpur start
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 438626929d0f7ecdc1a476539c93fe94230d4226 Mon Sep 17 00:00:00 2001
|
||||
From e87e36de2b313502386d54bcae4f7c531f1c183b Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 10:07:24 -0500
|
||||
Subject: [PATCH] Implement lagging threshold
|
||||
@@ -29,10 +29,10 @@ index a2cf8e29b..220cc96c0 100644
|
||||
* Get a sample of the servers last tick times (in nanos)
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 6690ef00c..8ce12a1c0 100644
|
||||
index 89100f3f5..ee0f2d6b2 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1429,6 +1429,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1439,6 +1439,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
String getServerName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user