3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

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

Dieser Commit ist enthalten in:
Shane Freeder 2021-03-04 01:39:18 +00:00
Ursprung 4c9bdf53ac
Commit 7d56f38ed0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -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++) {