9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 16:39:22 +00:00
Files
Leaf/patches/removed/server/0069-Fix-NPE-during-creating-GUI-graph.patch
Dreeam f56dc061d3 Updated Upstream (Paper/Gale)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@755a775 [ci skip] rebuild patches
PaperMC/Paper@3b9db2b Updated Upstream (Bukkit/CraftBukkit) (#11501)
PaperMC/Paper@c13f9fd Fix potential annotation testing interruption (#11460)
PaperMC/Paper@260c3bb Always send Banner patterns to the client (#11506)
PaperMC/Paper@14a48cd Some small touchups to the GUI (#11505)
PaperMC/Paper@d348cb8 Restrict BlockProjectileSource#launchProjectile

Gale Changes:
Dreeam-qwq/Gale@e893e3d Updated Upstream (Paper)
2024-10-22 22:05:12 -04:00

28 lines
1.4 KiB
Diff

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
Removed in 1.21.1, Paper fixed it
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++) {