CustomAPI to manage queues

Is it possible to automatically tag the next player on the list when it is there turn? Also I don’t completely understand the !next command. Why can’t I run it when the list is close?