Updated API Documentation (markdown)

NotMyFault 2021-04-27 17:22:13 +02:00
parent cf154fb161
commit 0eb5403e05
1 changed files with 81 additions and 37 deletions

@ -1,30 +1,38 @@
# API Documentation for PlotSquared
## JavaDoc
# JavaDoc
JavaDocs are available via: https://plotsquared.com/docs/
## Gradle
If you need to access the Bukkit module of PlotSquared, you need to add `PlotSquared-Bukkit` into the `dependencies` block and declare it as non-transitive.
```gradle
# Gradle - PlotSquared Core
If you need to access the Bukkit module of PlotSquared, copy the example below.
```kotlin
repositories {
maven { url = "https://maven.enginehub.org/repo/" } // WorldEdit
maven { url = "https://mvn.intellectualsites.com/content/groups/public/" } // PlotSquared
maven { url = uri("https://maven.enginehub.org/repo/") } // WorldEdit
maven { url = uri("https://mvn.intellectualsites.com/content/groups/public/") } // PlotSquared
}
// PlotSquared API
dependencies {
implementation("com.plotsquared:PlotSquared:5.1")
compileOnlyApi("com.plotsquared:PlotSquared-Core:5.13.11") // PlotSquared Core API
}
```
# Gradle - PlotSquared Core and Bukkit
```kotlin
repositories {
maven { url = uri("https://maven.enginehub.org/repo/") } // WorldEdit
maven { url = uri("https://mvn.intellectualsites.com/content/groups/public/") } // PlotSquared
}
dependencies {
compileOnlyApi("com.plotsquared:PlotSquared-Core:5.13.11") // PlotSquared Core API
compileOnlyApi("com.plotsquared:PlotSquared-Bukkit:5.13.11") { isTransitive = false } // PlotSquared Bukkit API
}
```
You can compile PlotSquared with Gradle, which is included with this repository:
$ `gradlew build`
## Maven
# Maven - PlotSquared Core
If you need to access the Bukkit module of PlotSquared, copy the example below.
If you need to access the Bukkit module of PlotSquared, you need to add `PlotSquared-Bukkit` as `<artifactId>` and declare it as non-transitive.
You need to add the WorldEdit repository as well.
```xml
<!-- WorldEdit -->
<repository>
@ -37,47 +45,83 @@ You need to add the WorldEdit repository as well.
<url>https://mvn.intellectualsites.com/content/groups/public/</url>
</repository>
<!-- PlotSquared API -->
<!-- PlotSquared Core API -->
<dependency>
<groupId>com.plotsquared</groupId>
<artifactId>PlotSquared</artifactId>
<version>5.1</version> <!-- Or 'latest' -->
<artifactId>PlotSquared-Core</artifactId>
<version>5.13.11</version>
</dependency>
```
```
## Useful classes for PlotSquared
[[PlotAPI|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/api/PlotAPI.java]]
[[PlotPlayer|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java]]
[[FlagContainer|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java]]
[[MainUtil|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/MainUtil.java]]
[[SchematicHandler|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java]]
[[ChunkManager|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java]]
[[UUIDHandler|https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandler.java]]
# Maven - PlotSquared Core and Bukkit
```xml
<!-- WorldEdit -->
<repository>
<id>enginehub</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<!-- PlotSquared -->
<repository>
<id>IntellectualSites</id>
<url>https://mvn.intellectualsites.com/content/groups/public/</url>
</repository>
## Tutorials
[Scripting with javascript](https://github.com/IntellectualSites/PlotSquared/wiki/Scripting)
[Creating Flags in v5](https://github.com/IntellectualSites/PlotSquared/wiki/API-Flag)
<!-- PlotSquared Core API -->
<dependency>
<groupId>com.plotsquared</groupId>
<artifactId>PlotSquared-Core</artifactId>
<version>5.13.11</version>
</dependency>
## Terminology:
#### Plot area:
<!-- PlotSquared Bukkit API -->
<dependency>
<groupId>com.plotsquared</groupId>
<artifactId>PlotSquared-Bukkit</artifactId>
<version>5.13.11</version>
<exclusions>
<exclusion>
<artifactId>PlotSquared-Core</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
```
# Useful classes for PlotSquared
- [PlotAPI](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/api/PlotAPI.java)
- [PlotPlayer](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java)
- [FlagContainer](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java)
- [MainUtil](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/MainUtil.java)
- [SchematicHandler](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java)
- [ChunkManager](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java)
- [UUIDHandler](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/uuid/UUIDHandler.java)
# Tutorials
- [Flag API](/plotsquared/developer/flags)
- [Event API](/plotsquared/developer/events)
> **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!
{.is-success}
# 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: [MainUtil.java](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/MainUtil.java)#getPlotAreaByString(...)
#### Clusters
## 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](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/plot/PlotCluster.java)
See: [PlotSquared.java](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/PlotSquared.java(...))
#### Road
## 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](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/location/Location.java)#isPlotRoad(...)
#### Plot
## 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: [MainUtil.java](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/MainUtil.java)#getPlots(...)
>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!
See: [MainUtil.java](https://github.com/IntellectualSites/PlotSquared/blob/v5/Core/src/main/java/com/plotsquared/core/util/MainUtil.java)#getPlots(...)