Reimplement ChatColorGradient.pickColorAt() to make it less error-prone

This commit is contained in:
2023-07-04 23:15:06 +02:00
parent 79e4bb90f7
commit 9e7d89cf70
2 changed files with 28 additions and 17 deletions

View File

@@ -302,7 +302,7 @@ public class PerformanceAnalysisManager implements Listener {
for (int i = 58; i >= 0; i--) {
int t = tpsHistory[i];
ChatColor newC = ChatColorUtil.toBungee(tps1sGradient.pickColorAt(t));
if (newC != prevC) {
if (!newC.equals(prevC)) {
s.append(newC);
prevC = newC;
}