Updated countdown design and behavior
This commit is contained in:
@@ -66,13 +66,13 @@ public class ComponentUtil {
|
||||
.build();
|
||||
}
|
||||
|
||||
public static Component createRainbowText(String text) {
|
||||
public static Component createRainbowText(String text, int step) {
|
||||
Component builder = Component.empty();
|
||||
int hue = 0;
|
||||
for (char c : text.toCharArray()) {
|
||||
TextColor color = TextColor.color(Color.getHSBColor((float) hue / 360, 1, 1).getRGB());
|
||||
builder = builder.append(Component.text(c).color(color));
|
||||
hue += 30;
|
||||
hue += step;
|
||||
}
|
||||
|
||||
return builder;
|
||||
|
||||
Reference in New Issue
Block a user