Skip to content
CleverNucleus edited this page Sep 10, 2022 · 28 revisions

Wiki

This wiki aims to cover two topics: the in-game usage of PlayerEx; and the integration of the PlayerEx API into your own mod. Therefore, the points discussed here can generally be split into developer-centric or player-centric levels of understanding; with the former requiring the latter as a basis.

Developer Setup

To add PlayerEx as a dependency to your mod, you can either use cursemaven or clone this repository and publish to your local maven.

Cursemaven

repositories {
    maven {
        url = "https://www.cursemaven.com"
    }
}

MavenLocal

repositories {
    mavenLocal()
}

PlayerEx uses some jar-in-jar dependencies, which means you need to include the maven repository for those too. PlayerEx's dependencies are the following:

repositories {
    mavenCentral()
    maven {
        name = "Ladysnake Mods"
        url = 'https://ladysnake.jfrog.io/artifactory/mods'
    }
    maven {
        url "https://maven.shedaniel.me/"
    }
    maven {
        url "https://maven.nucleoid.xyz/"
    }
    maven {
        url "https://maven.terraformersmc.com/"
    }
    mavenLocal()
}

Data Attributes can be taken from cursemaven or localmaven (cloning). At this time, Offline Player Cache must be cloned and published to mavenlocal.

For cursemaven, the following is used:

dependencies {
    modImplementation "curse.maven:playerex-409221:<file number>"
}

The last number after the colon refers to the file id; you should always try to use the latest file.

It should be noted that if you are using cursemaven to get playerex as a dependency, you will need to manually add all of playerex's dependencies as well, as they will not automatically be added like when using a proper maven repository. I only use cursemaven as a primary repository because I'm cheap and lazy. Until another method comes along that doesn't require me to spend money, this is it unfortunately. Also note that you need to ensure all the relevant dependencies are present.