Fix missing min value check

This commit is contained in:
M2ke4U
2023-12-20 20:05:38 +08:00
committed by GitHub
parent ae5a4e8e67
commit b2689cc08c

View File

@@ -236,7 +236,7 @@ index 0000000000000000000000000000000000000000..baec715e0c20e920ccb99f2f07d84fcb
+ Placeholder.component("ping",getPingComponent(player.getPing()))
+ ));
+ bar.color(barColorFromTps(tps));
+ bar.progress((float) Math.max(mspt / 50,0));
+ bar.progress((float) Math.min((float)1,Math.max(mspt / 50,0)));
+ }
+
+ private static @NotNull Component getPingComponent(int ping){