With Wfly, you can execute console commands on time remaining
message.yml
commands-time-remaining:
0: #in seconds
commands: 'title %player% title {"text":"You have 0 seconds fly left!","bold":true,"color":"gold"}'
1:
commands: 'title %player% title {"text":"You have 1 seconds fly left!","bold":true,"color":"gold"}'
2:
commands: 'title %player% title {"text":"You have 2 seconds fly left!","bold":true,"color":"gold"}'
3: # when player have 3 seconds left, it's will execute commands below
commands: 'title %player% title {"text":"You have 3 seconds fly left!","bold":true,"color":"gold"}'
5:
commands: 'title %player% title {"text":"You have 5 seconds fly left!","bold":true,"color":"gold"}'