InstallAPI - maximaximal/Minecraft-Modder GitHub Wiki

Structure

The API is a class named "installAPI" and has to be initialized with the call of $API->Init(ProcessNumber). This defines the intern variables (directories) correctly and initializes the API.

Public Functions

Init

$API->Init(ProcessNumber)

Initializes the API and sets some intern variables.

ProcessNumber The Process-Number of the current modding process.

log

$API->Log(Message, From)

Logs the message to the install.log in the logging-directory (located at modding/log)

Message Will be written to the install.log log-file.

From Will be written to the log-file with the message; to point out which part of the code logged a message.

Extract

$API->Extract(file, target)

This extracts a zip-file to the defined location.

file The file to be extracted

target The folder, the contents of file will be extracted to.

TestPath

$API->TestPath(Path)

This tests a path for its destination. If it's bad (a parent folder), it will return false.

Path The path to be checked.

JarDelete

$API->JarDelete(Path)

This detects if the path is a file/folder and then deletes it recursively.

Path This will be deleted.

Still writing the docs :(