Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Latest commit

 

History

History
47 lines (38 loc) · 2.11 KB

File metadata and controls

47 lines (38 loc) · 2.11 KB

LuaLink Documentation

The project is in an experimental state, so is the documentation - expect things to change quite often.

For new Lua users, this community-contributed documentation may help you to get started.


Navigation


External Libraries

Starting from build 15, you can now add external Java/Kotlin libraries to your Lua scripts by configuring the /plugins/LuaLink/libraries.json file.


Configuration Example

{
    // Repositories to be used for dependency resolution.
    "repositories": {
        // Repository definition using simple format.
        "MavenCentral": "https://repo.maven.apache.org/maven2/",
        // Repository definition with credentials authentication.
        "SomePrivateRepository": {
            "url": "https://repo.example.com/private",
            "username": "RepositoryUsername",
            "password": "SecretRepositoryPassword123"
        }
    },
    // Dependencies to be downloaded and exposed to the scripting runtime.
    // Entries must be specified using Maven coordinate format: groupId:artifactId:version
    "dependencies": [
        "com.github.stefvanschie.inventoryframework:IF:0.10.11"
    ]
}

In this example, we are adding stefvanschie's IF library of version 0.10.11 from Maven Central repository. You can also see how to add and authenticate with a private repository using credentials, which might be essential when working with closed-source projects or GitHub Packages.

After restarting the server, we should be able to import and access any class that belongs to specified library(-ies).