Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

API Documentation

NotMyFault edited this page Sep 25, 2021 · 74 revisions

JavaDoc

JavaDocs: https://ci.athion.net/job/PlotSquared-v6-Javadocs/javadoc/

Gradle is recommended to use due PlotSquared being build with gradle so direct support for gradle-features can be offered. Ensure the toolchain points to Java 16 or higher.

If you are looking for snapshots, add the repository of S01 OSS Sonatype to the repositories' block.

Gradle - PlotSquared Core

If you need to access the Bukkit module of PlotSquared, copy the example below.

repositories {
    mavenCentral()
    maven {
        name = "IntellectualSites Releases"
        url = uri("https://mvn.intellectualsites.com/content/repositories/releases/")
    }
    maven {
        name = "IntellectualSites Snapshots"
        url = uri("https://mvn.intellectualsites.com/content/repositories/snapshots/")
    }
    maven {
        name = "EngineHub"
        url = uri("https://maven.enginehub.org/repo/")
    }
    maven {
        name = "OSS Sonatype"
        url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
    }
}

dependencies {
    compileOnly("com.plotsquared:PlotSquared-Core:6.1.2") // PlotSquared Core API
}

Gradle - PlotSquared Core and Bukkit

repositories {
    mavenCentral()
    maven {
        name = "IntellectualSites Releases"
        url = uri("https://mvn.intellectualsites.com/content/repositories/releases/")
    }
    maven {
        name = "IntellectualSites Snapshots"
        url = uri("https://mvn.intellectualsites.com/content/repositories/snapshots/")
    }
    maven {
        name = "EngineHub"
        url = uri("https://maven.enginehub.org/repo/")
    }
    maven {
        name = "OSS Sonatype"
        url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
    }
}

dependencies {
    compileOnly("com.plotsquared:PlotSquared-Core:6.1.2") // PlotSquared Core API
    compileOnly("com.plotsquared:PlotSquared-Bukkit:6.1.2") { isTransitive = false } // PlotSquared Bukkit API
}

Maven - PlotSquared Core

<!-- WorldEdit -->
<repository>
    <id>intellectualsites releases</id>
    <url>https://mvn.intellectualsites.com/content/repositories/releases/</url>
</repository>
<repository>
    <id>intellectualsites snapshots</id>
    <url>https://mvn.intellectualsites.com/content/repositories/snapshots/</url>
</repository>
<repository>
    <id>enginehub</id>
    <url>https://maven.enginehub.org/repo/</url>
</repository>
<repository>
    <id>OSS Sonatype</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

<!-- PlotSquared Core API -->
<dependency>
    <groupId>com.plotsquared</groupId>
    <artifactId>PlotSquared-Core</artifactId>
    <version>6.1.2</version>
    <scope>provided</scope>
    <type>pom</type>
</dependency>

Maven - PlotSquared Core and Bukkit

<!-- WorldEdit -->
<repository>
    <id>intellectualsites releases</id>
    <url>https://mvn.intellectualsites.com/content/repositories/releases/</url>
</repository>
<repository>
    <id>intellectualsites snapshots</id>
    <url>https://mvn.intellectualsites.com/content/repositories/snapshots/</url>
</repository>
<repository>
    <id>enginehub</id>
    <url>https://maven.enginehub.org/repo/</url>
</repository>
<repository>
    <id>OSS Sonatype</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

<!-- PlotSquared Core API -->
<dependency>
    <groupId>com.plotsquared</groupId>
    <artifactId>PlotSquared-Core</artifactId>
    <version>6.1.2</version>
    <scope>provided</scope>
    <type>pom</type>
</dependency>

<!-- PlotSquared Bukkit API -->
<dependency>
    <groupId>com.plotsquared</groupId>
    <artifactId>PlotSquared-Bukkit</artifactId>
    <version>6.1.2</version>
    <scope>provided</scope>
    <type>pom</type>
    <exclusions>
        <exclusion>
            <artifactId>PlotSquared-Core</artifactId>
            <groupId>*</groupId>
        </exclusion>
    </exclusions>
</dependency>

Useful classes for PlotSquared

Tutorials

Tip: If you have made a tutorial, or an addon for PlotSquared, and want us to link it here, please create an issue. We'd really appreciate it!

Terminology

Plot area

A plot area is any area that PlotSquared will manage/handle. If this is an infinite plot world, the entire world is considered to be a plot area. If you use plot clusters, then only part of the world will be a plot area, and anything outside this area will not be handled by PlotSquared.

See: PlotAreaManager.java#getPlotAreaByString(...)

Clusters

Clusters can be created within existing plot areas, or they can be created in a previously non-plot world, which will in turn create it's own plot area.

See: PlotCluster.java See: PlotSquared.java

Road

A road is what separates each plot, and includes the wall around each plot. Attempting to get a plot at this location will return null.

See: Location.java#isPlotRoad(...)

Plot

A plot can be claimed or unclaimed. Getting a plot at a location where one isn't claimed will return a new unowned plot object.

See: PlotArea.java#getPlots(...)

Clone this wiki locally