Skip to content
alex9849 edited this page Aug 6, 2023 · 8 revisions

Maven Dependency

At first, you have to add AdvancedRegionMarket as a dependency to your project. If you use maven you have to add the Advanced-Region-Market repository:

<repositories>
        <repository>
            <id>alex9849</id>
            <url>https://nexus.alex9849.net/repository/maven-releases/</url>
        </repository>
</repositories>

If you want access to snapshot builds add this repository:

<repositories>
        <repository>
            <id>alex9849-snapshots</id>
            <url>https://nexus.alex9849.net/repository/maven-snapshots/</url>
        </repository>
</repositories>

Afterwards, you have to add AdvancedRegionMarket as a dependency to your project:

<dependencies>
    <dependency>
        <groupId>net.alex9849.advancedregionmarket</groupId>
        <artifactId>advancedregionmarket</artifactId>
        <version>3.5.3</version>
    </dependency>
</dependencies>

Change the version field to the version that you want to use. You can use every released version beginning at 3.5.3

API
You can program your own plugins that make use of AdvancedRegionMarket by using its API. There are some events that can be used:

  • AddRegionEvent: Is called if a new region gets added to ARM.
  • PreBuyEvent: Is called if a region is about to get bought.
  • PreExtendEvent: Is called if a rentregion or contractregion gets extended.
  • RemoveRegionEvent: Is called if a region gets removed from ARM.
  • RestoreRegionEvent: Is called if a region gets restored. Not that restoration and reset is not the same. Region restore means, that everything that has been built on a region gets rolled back into its initial state. Reset means that is also gets unsold.
  • UnsellRegionEvent: Is called if a region gets unsold. Not that this doesn't necessarily implies a region restore.
  • UpdateRegionEvent: Is called if a some property of a region has been altered and the region gets maked as unsaved. All events are cancelable.

Examples:
Get all regions that contain a specitic location:
AdvancedRegionMarket.getInstance().getRegionManger().getRegionsByLocation(Location);

Iterate through all regions:
AdvancedRegionMarket.getInstance().getRegionManager()

Get all rentregions:
AdvancedRegionMarket.getInstance().getRegionManger().getRegionsBySelltype(SellType.RENT);

AdvancedRegionMarket

Setup

How it works

  • Video tutorials - Watch and learn with Major Graft.
  • Create a region
  • Region settings
  • Presets - Define region settings before creating a region.
  • Autoprices - Calculate the price of a region automatically.
  • Regionkinds - Regionkinds and RegionkindGroups can be assigned to your regions to group them together and bring them into a context.
  • Limits - Limit the number of regions a player can buy.
  • Inactivity reset & Takeover - Automatically reset a region because of inactivity or let members of regions with inactive owners become the new owner.
  • FlagGroups - Assign certain flags to a region depending on its state.
  • Entitylimits - Limit the type and number of entities a player is allowed to have on a region.

Reference

Support

  • Discord - Get involved with other AdvancedRegionMarket Admins, Plugin Developers, Testers. Support, General Discussion welcome.

Sponsoring/Donations

  • Sponsor - Sponsor the development of AdvancedRegionMarket
Clone this wiki locally