Skip to content

Basic Information (IMPORTANT)

N-aksif-N edited this page Apr 14, 2024 · 13 revisions

Logo

Mine Colab [Improved]

Run Minecraft Server on Google Colab

Star Open In Colab Download

Introduction

Today, I will tell you the basis information for developing the main functions. Let's deep down, right now!

Python libraries:

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

Global variables:

  • drive_path : Path to your drive files.
  • SERVERCONFIG : Path to your serverconfig.txt file.
  • COLABCONFIG : Function but used for getting the path to colabconfig.txt file.
  • JAR_LIST_RUN : Function, return dict including jar file name for each software.

Function 1: LOG, GET, DOWNLOAD_FILE -- Necessary function

  • LOG:

Purpose: Print color texts

Mechanism:

image

  • GET:

Purpose: HTML parse.

Mechanism:

image

  • DOWNLOAD_FILE:

Purpose: Download jar files.

Mechanism:

image

Function 2: COLABCONFIG_LOAD, SERVER_IN_USE

  • COLABCONFIG_LOAD:

Purpose: Load colabconfig content

Mechanism: In-process

  • SERVER_IN_USE:

Purpose: Get servers that are in use.

Mechanism: In-process

Function 3: INSTALL_JAVA

Purpose: Install Java (Java 8 for versions < 1.17 except from 1.16.5 and Java 17 for versions > 1.17)

Mechanism: In-process

Function 4: SERVERSJAR

-- Inprocess

Introduction:

  • This page is all about how the main functions in the scripts work.
  • It is important for developers/ contributors to read this.
Clone this wiki locally