For as long as I can remember, when you open the Energy Saver system preference pane, you would get two slider options for “Computer sleep” and “Display sleep”. Both sliders had options ranging from 1 minute to never. This was the standard from OS X 10.2-10.9.
Apparently this isn’t the case for all Macs anymore, especially models manufactured after late 2013. On newer Macs running Mavericks, there is just one slider option for “Turn display off after” ranging from 1 minute to never. The slider option for “Computer sleep” has been removed, and replaced with a checkbox for “Prevent computer from sleeping when the display is off”.
Previously, I would recommend setting the slider option for “Computer sleep” to never when running on power. With these newer Macs, the equivalent would be checking the option for “Prevent computer from sleeping when the display is off”.