Is there a way to start a Minecraft server when a player tries to connect to it?

I've been wondering whether this is possible or not, or if there's a plugin or setting for it.


Solution 1:

As Mushu said, you would need a wrapped Minecraft server. McMyAdmin can be easily configured to do such job. Go to Configuration -> Features tab -> Set 'Enable server sleeping' to Yes and configure the time below.

Solution 2:

There are plugins and programs that let you put your server into a mode called sleep mode, when in this mode the server is shown in the list as online but is really offline. When a person tries to connect it will give them a message along the lines of; Server Starting and send them back to the list screen. The server will then automatically start up and boom your only running the server when people are on. With programs/plugins such as this it also lets you set how long after the server having no people on will it be before it shuts down. I am sorry I cannot provide the links to the programs/plugins but if I remember them I will post them here.

Solution 3:

Try this link:

https://github.com/gekigek99/minecraft-server-hibernation

It's a program that I created which starts up the server when a player tries to join and shuts it down when no players are online.