How to register a command?

All the info I can find seems to be old, as it says to use the ServerStartingEvent, which does not exist.

Can someone tell me how, or link me to some currently relevant example code?

Thank you.

https://docs.spongepowered.org/stable/en/plugin/commands/index.html

@Eliminator_v can you show us where what you were reading was incorrect? otherwise we can’t fix what’s wrong.

https://docs.spongepowered.org/stable/en/plugin/commands/service.html?highlight=GameInitializationEvent