Is it possible to create an animated BossBar like bukkit and spigot?

skilo

Member
I'm working on making a new server with nukkit, and I was wondering if it's possible to create an animated bossbar? Explaining in more detail, It would be a regular Bossbar. But the only difference is the text changes after a few seconds or less.

It would look something like this...

Line1 : &ctest
Line2 : &6test
Line3 : &atest
Line4 : &btest

Each line is set one at a time as the bossbar text after at least 3 seconds or less.

If there is any way of creating an animated bossbar, Please post a code example. This will help a lot.

Thanks :)

Btw: Sorry if it wasn't explained good enough, This was extremely stressful and hard for me to explain.
 
Hello...
I'd do it with a repeat loop and a sleep in between.
Like this:

Player player;
while (true) {
Player.setbossbar("Text1");
time.sleep(3000);
Player.setbossbar("Text2");
Time.sleep(3000);
Player.setbossbar("Text3");
Time.sleep(3000);
}

I hope I could help you, but beware the method setbossbar does not exist, you have to find the right one.
Greetings Redstoneking18
 

skilo

Member
Hello...
I'd do it with a repeat loop and a sleep in between.
Like this:

Player player;
while (true) {
Player.setbossbar("Text1");
time.sleep(3000);
Player.setbossbar("Text2");
Time.sleep(3000);
Player.setbossbar("Text3");
Time.sleep(3000);
}

I hope I could help you, but beware the method setbossbar does not exist, you have to find the right one.
Greetings Redstoneking18
Thank you, But I don't think using a Forever Loop will work properly. It could overload the server. >:O
 
Top