githubEdit

Setup

arrow-up-right

Javadoc

The JavaDoc can be found here: JitPackarrow-up-right

API Usage explained

Include the API using Gradle:

repositories {
   maven { url 'https://jitpack.io' }
}

dependencies {
    compileOnly "com.github.angeschossen:LandsAPI:version"
}

Replace version with the version that you want to use.

Include the API using Maven:

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.angeschossen</groupId>
        <artifactId>LandsAPI</artifactId>
        <version>version</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Replace version with the version that you want to use.

The API is accessible through an implementation of the LandsIntegration interface. It is recommended to bind this instance to a variable of a singleton class, if possible.

Common Use-Cases

  1. Checking Role-Flag States for Players Using LandWorldarrow-up-right to check flag states has the benefit that it also checks wilderness flags. Some use cases might not intent that. In this case you can use LandsIntegration#getArea(location)arrow-up-right and check the flag state of the area instead.

  2. Checking Natural-Flag States LandWorldarrow-up-right does check wilderness and claimed lands if applicable. If you want to limit the check to claimed land, use LandsIntegration#getArea(location)arrow-up-right instead of getting the world.

  3. Registering your own Flags This one is simple as well. Just use the factory methods of the needed flag type's interface: RoleFlag.of(...)arrow-up-right, NaturalFlag.of(...)arrow-up-right etc. Please note that flags need to registered after Lands was loaded, but before Lands enables. You can ensure that, by using this method in your onLoad method of your plugins main class: LandsIntegration#onLoadarrow-up-right

    It is recommended to set further attributes:

Last updated