-
Notifications
You must be signed in to change notification settings - Fork 56
Basic Information (IMPORTANT)
Aksif edited this page Apr 18, 2024
·
13 revisions
Run Minecraft Server on Google Colab
Today, I will explain the basic information for developing the main functions. Because each main function has its own small function, I will tell it on the page that describes the main function not in this page.
Libraries | Commands | Uses | X | Libraries | Commands | Uses |
---|---|---|---|---|---|---|
os | environ() | Setting java environment | X | jproperties | Properties() | Read server.properties files |
os.path | exists() | Checking exsisting folder | X | rich | print() | print color texts |
requests | get() | HTML Parse | X | google.colab | drive() | Mounting google drive |
time | sleep() | Wait for done (Commands) | X | pyngrok | ngrok() | Ngrok connecting |
json | load() | Transform to dict type | X | pyngrok | conf() | Ngrok configuring |
json | dump() | Dumping dict values to .txt files | X | bs4 | BeautifulSoup4() | HTML Parse |
- drive_path : Path to your drive files. |
'/content/drive/MyDrive/minecraft'
- SERVERCONFIG : Path to your serverconfig.txt file. |
f'{drive_path}/server_list.txt'
- COLABCONFIG : Function but used for getting the path to colabconfig.txt file. |
f"{drive_path}/{server_name}/colabconfig.txt"
- minecraft: The folder which stored all Minecraft server folders
- colabconfig.txt: The file that include dict value: |
{'server_name': 'Your-server-name', 'server_type': 'Your-server-type', 'tunnel_service': 'your-tunnel-service'}
.- If you use ngrok service, colabconfig.txt will include:
{'server_name': 'Your-server-name', 'server_type': 'Your-server-type', 'tunnel_service': 'your-tunnel-service', 'authtoken': 'Your-ngrok-authtoken', 'region': 'Your-region'}
- If you use ngrok service, colabconfig.txt will include:
- serverconfig.txt: The file tell you the server which are in used also the minercraft server list. |
{'server_list': 'Server-list', 'server_in_use': 'Server-in-use'}
- If you use ngrok service, serverconfig.txt will include:
{'server_list': 'Server-list', 'server_in_use': 'Server-in-use', "ngrok_proxy": {'authtoken': 'Your-ngrok-authtoken', 'region': 'Your-region'}}
- If you use ngrok service, serverconfig.txt will include:
- LOG:
- Purpose: Print color texts
- Mechanism:
- GET:
- Purpose: HTML parse.
- Mechanism:
- DOWNLOAD_FILE:
- Purpose: Download jar files.
- Mechanism:
- COLABCONFIG_LOAD:
- Purpose: Load colabconfig content
- Mechanism:
- SERVER_IN_USE:
- Purpose:
- Check whether server_name exists.
- Get servers that are in use. (if server_name is an empty string)
- Mechanism:
- Purpose:
That's all. Want more? Check out others in Wiki
Want to ask anything? Join the discord: Minecolab Helper