Setup
Last updated
Last updated
The JavaDoc can be found here: JitPack
Include the API using Gradle:
Replace version
with the version that you want to use.
Include the API using Maven:
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
Checking Role-Flag States for Players Using LandWorld 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) and check the flag state of the area instead.
Checking Natural-Flag States LandWorld does check wilderness and claimed lands if applicable. If you want to limit the check to claimed land, use LandsIntegration#getArea(location) instead of getting the world.
Registering your own Flags
This one is simple as well. Just use the factory methods of the needed flag type's interface: RoleFlag.of(...), NaturalFlag.of(...) 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#onLoad
It is recommended to set further attributes: