Do not use the bukkit singleton for the GUI (Fixes #5301)

This commit is contained in:
Shane Freeder 2021-03-04 01:39:18 +00:00
parent 4c9bdf53ac
commit 7d56f38ed0
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C

View File

@ -7,7 +7,7 @@ Subject: [PATCH] Improve ServerGUI
- Show tps in the server stats
diff --git a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
index e463a86a6ad6c4f2885f4df159411bad294e1208..93291d856b7ad4fae72b6b53149677904960d732 100644
index e463a86a6ad6c4f2885f4df159411bad294e1208..d21d081ef3e3eee1d14ce3dfdd8c810cc8382b80 100644
--- a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
+++ b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
@@ -58,9 +58,18 @@ public class RAMDetails extends JList<String> {
@ -15,7 +15,7 @@ index e463a86a6ad6c4f2885f4df159411bad294e1208..93291d856b7ad4fae72b6b5314967790
GraphData data = RAMGraph.DATA.peekLast();
Vector<String> vector = new Vector<>();
+
+ double[] tps = Bukkit.getTPS();
+ double[] tps = new double[] {server.tps1.getAverage(), server.tps5.getAverage(), server.tps15.getAverage()};
+ String[] tpsAvg = new String[tps.length];
+
+ for ( int g = 0; g < tps.length; g++) {