-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
# minecraft-server-hibernation | ||
version 3.0 | ||
forked from [gekigek99](https://github.com/gekigek99/minecraft-vanilla-server-hibernation) | ||
which is derived from [supernifty](https://github.com/supernifty/port-forwarder) | ||
version 3.1 | ||
concept and early-code by [gekigek99](https://github.com/gekigek99/minecraft-vanilla-server-hibernation)<br/> | ||
contributor (advanced-code) by [najtin](https://github.com/najtin/minecraft-server-hibernation)<br/> | ||
derived from [supernifty](https://github.com/supernifty/port-forwarder)<br/> | ||
|
||
This is a simple Python script to start a minecraft server on request and stop it when there are no player online. | ||
How to use: | ||
1. Install and run your desiered minecraft server. | ||
1. Install and run your desiered minecraft server | ||
2. Rename the minecraft-server-jar to 'minecraft_server.jar' | ||
3. Change the port in 'server.properties' to 25555 | ||
4. Edited the paramters in the script as needed. | ||
5. run the script | ||
5. run the script at reboot | ||
6. you can connect to the server through port 25565 | ||
|
||
**IMPORTANT** | ||
If you are the first to access to minecraft world you will *have to wait 120 seconds*. | ||
If you are the first to access to minecraft world you will *have to wait 30 seconds* and then try to connect again. | ||
```Python | ||
MINECRAFT_SERVER_STARTUPTIME = 120 | ||
MINECRAFT_SERVER_STARTUPTIME = 30 #any parameter more than 10s is recommended | ||
``` | ||
After that you have 240 to connect to the server before it is shutdown. | ||
After 120 seconds you have 240 to connect to the server before it is shutdown. | ||
```Python | ||
TIMEOUT_SOCKET = 240 | ||
TIME_BEFORE_STOPPING_EMPTY_SERVER = 120 #any parameter more than 60s is recommended | ||
``` | ||
You can change these parameters to fit your needs. |