setModeAndSave

public static void setModeAndSave(PetsConfig.Mode newMode)

Switches the mode and writes it to pets.yml, so the setup menu and the admin command survive restarts.