join:
wait a ticks
bossBarAnemys(event-player)
function bossBarAnemys(p: player):
set {_time} to 60
set bar progress of {_bar} to 100
set {_bar} to boss bar with id "authMe.%{_p}%" with title "&e/login <şifre> &8|&e /register <şifre> <şifre>" with progress 100
add {_p} to {_bar}
set bar style of {_bar} to segmented 10
set bar flag darken sky of {_bar} to true
loop 60 times:
{_p} is online:
remove 1 from {_time}
set bar progress of {_bar} to {_time}
{_time} = 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 or 60:
set bar color of {_bar} to green
{_time} <= 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 or 30:
set bar color of {_bar} to yellow
{_time} <= 1, 2, 3, 4, 5, 6, 7, 8, 9 or 10:
set bar color of {_bar} to red
add {_p} to {_bar}
wait a seconds
{_time} = 0:
delete boss bar with id "authMe.%{_p}%"
stop loop if {_p} is not online
else:
delete boss bar with id "authMe.%{_p}%"
stop loop if {_p} is not online