9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00

Refactor: Leaf Config v3 (#81)

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* Change contact info in config

* Add contact info for QQ group

* Add more detailed explanation for configurable connection message config

* Fix comments grammar issues

* Purge old or outdated config on load config

* Clean up
This commit is contained in:
Dreeam
2024-07-12 01:34:15 +08:00
committed by GitHub
parent f4670d0867
commit 4a06d00973
85 changed files with 1116 additions and 727 deletions

View File

@@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Tue, 27 Feb 2024 03:27:48 -0500
Subject: [PATCH] Fix NPE during creating GUI graph
diff --git a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
index 7c32c60100cf2bd109eb8762efa856c10b704fdd..81d40895cfa84676f5b200f53b128d9d6c5bc0bd 100644
--- a/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
+++ b/src/main/java/com/destroystokyo/paper/gui/RAMDetails.java
@@ -59,7 +59,14 @@ public class RAMDetails extends JList<String> {
GraphData data = RAMGraph.DATA.peekLast();
Vector<String> vector = new Vector<>();
- double[] tps = org.bukkit.Bukkit.getTPSIncluding5SecondAverage(); // Gale - Purpur - 5 second TPS average
+ // Leaf - Revert to fix potential NPE during creating GUI graph
+ double[] tps = new double[] {
+ server.tps5s.getAverage(),
+ server.tps1.getAverage(),
+ server.tps5.getAverage(),
+ server.tps15.getAverage()
+ }; // Gale - Purpur - 5 second TPS average
+ // Leaf end - Revert to fix potential NPE during creating GUI graph
String[] tpsAvg = new String[tps.length];
for ( int g = 0; g < tps.length; g++) {