API
Learn how to install and use the API
Towns and Nations API is new and errors may happen. To report a bug or suggest an update, please reach us on Discord.
Installing the API
The API tan-api is hosted on maven central portal. It can be compiled from Maven and Gradle :
repositories {
mavenCentral()
}
dependencies {
compileOnly 'io.github.leralix:tan-api:0.3.0'
}repositories {
mavenCentral()
}
dependencies {
compileOnly("io.github.leralix:tan-api:0.3.0")
}<dependencies>
<dependency>
<groupId>io.github.leralix</groupId>
<artifactId>tan-api</artifactId>
<version>0.3.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>Javadoc can be found here.
Main manager classes :
PlayerManager
Handles all player-related actions, such as:
Retrieving player data.
Managing town membership.
TerritoryManager
Manages town and region data:
Fetching town details.
Checking region ownership.
ClaimManager
Handles land claims and permissions:
Checking chunk and block ownership.
Claiming chunk for territories
LandmarkManager
Manages property data:
Retrieving landmarks and structures.
Modifying rewards
Last updated