every seconds:
while player is online:
loop {mine.%@layer%}:
set action bar of player to coloured "%loop-value%"