API

Welcome to the ProtectionStones API page!

Please feel free to ask questions on the MOSS Discord: https://discord.gg/PHpuzZSarrow-up-right

Reference Documentation

You can access the JavaDocs here.arrow-up-right

Pulling the dependency

Also be sure to add the WorldGuard API as well herearrow-up-right.

Maven

<dependency>
  <groupId>dev.espi</groupId>
  <artifactId>protectionstones</artifactId>
  <version>2.10.2</version>
  <scope>provided</scope>
</dependency>

Gradle

repository {
    mavenCentral()
}
...
dependencies {
    compile 'dev.espi:protectionstones:2.10.2'
}

Getting started

The ProtectionStones API is mainly an addon for the WorldGuard APIarrow-up-right, providing developers access to ProtectionStones specific features as well.

Classes of interest

Be sure to check out the respective JavaDocs for each class.

ProtectionStones

This class provides access to base plugin information, such as config options and configured protection block types.

PSPlayer

A wrapper class for players, allowing for access to ProtectionStones related player information, such as the regions they own and the limits they have for each region type.

Some methods may be restricted if the player given is an offline player, or just a UUID.

PSRegion

The abstract base class that represents ProtectionStones regions.

This allows for access to all of the information related to regions.

You can obtain it in several ways:

There are three types:

PSStandardRegion

Represents a standalone region that is not merged with others, and internally wraps a WorldGuard ProtectedRegion.

PSGroupRegion

Represents a region that consists of more than one block (merged regions), and internally wraps a single WorldGuard ProtectedRegion.

PSMergedRegion

Represents a merged region that is in a PSGroupRegion. These do not technically exist as a WorldGuard region, but ProtectionStones makes an abstraction so that they can be treated as one.

PSCreateEvent

Event that is called when a ProtectionStones region is created.

PSRemoveEvent

Event that is called when a ProtectionStones region is removed.

Last updated