then, if you do /gen start <worldName>, it starts all of the generators in that world.
For example, this would mean that if the players were waiting in the bedwars lobby, the generator isnt running. However, when the game starts, you can execute a command (/gen start <worldName> so that the generators start.
then after you're finished, you can do /gen stop <worldName>