Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squaremap Support #107

Merged
merged 11 commits into from
Apr 4, 2024
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## :information_source: Overview
- :world_map: An add-on plugin for *Towny*, which makes claiming more organized, reducing staff workload and server toxicity.

## :gift: Features
- :globe_with_meridians: **Divides The Map Automatically into Provinces:**
- :tophat: Civilised Provinces: 1 town only, no foreign outposts allowed.
Expand All @@ -25,11 +25,11 @@

## :floppy_disk: Installation Guide
1. Ensure your server has *Towny 0.99.1.0* or newer.
2. Ensure your server has a map-display plugin: Either *Dynmap*, *Pl3xmap* or *BlueMap*.
2. Ensure your server has a map-display plugin: Either *Dynmap*, *Pl3xMap*, *BlueMap* or *squaremap*.
3. Download the *TownyProvinces* plugin jar file from [here](https://github.com/TownyAdvanced/TownyProvinces/releases), and drop it into your server plugins folder.
4. Stop your server.
5. Start your server with plenty of memory (*especially for big maps*).
- Example: With Spigot you might run: `java -Xms1G -Xmx3G -XX:+UseG1GC -jar spigot-1.19.4.jar nogui`.
- Example: With Spigot you might run: `java -Xms1G -Xmx3G -XX:+UseG1GC -jar spigot-1.20.4.jar nogui`.

## :football: Player Guide
- :cityscape: Towns:
Expand All @@ -42,7 +42,7 @@

## :fast_forward: Admin Quick-Start Guide
1. Run `tpra region regenerate all`. This will generate 2 small sample regions.
2. To see the generated provinces, view your website-map.
2. To see the generated provinces, view your website-map.

## :arrow_forward: Admin Full Guide
1. Protect Historical Town Locations
Expand All @@ -65,7 +65,7 @@
- `tpra region [regenerate] [<Region Name>]` -> Regenerate a region.
- `tpra landvalidationjob [status|start|stop|restart|pause]` -> Control the land validation job.
- This Job assigns a type to each provinces, either Civilized, Sea, or Wasteland. It also Assesses and records the Biome proportions in each province. These proportions affect the new/upkeep prices.
- *NOTE: The automatic validation is not perfect, so expect to convert a few provinces afterwards using the below commands.*
- *NOTE: The automatic validation is not perfect, so expect to convert a few provinces afterwards using the below commands.*
- `tpra province settype [civilized|sea|wasteland] [<x>,<z>]` -> Set the type of a province.
- `tpra province settype [civilized|sea|wasteland] [<x1>,<z1>] [<2x>,<z2>]` -> Set the type of all provinces in a rectangular area.
- `tpra region [newtowncostperchunk] [<Region Name>] [amount]` -> Set the per-chunk new-town-cost for a region.
Expand Down
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>maven.modrinth</groupId>
<artifactId>pl3xmap</artifactId>
<version>1.20.1-468</version>
<version>1.20.4-476</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -77,6 +77,12 @@
<version>v2.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xyz.jpenilla</groupId>
<artifactId>squaremap-api</artifactId>
<version>1.1.12</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ private boolean loadIntegrations() {
e.printStackTrace();
}
}
if (getServer().getPluginManager().isPluginEnabled("squaremap")) {
info("Found Squaremap. Enabling Squaremap integration.");
MapDisplayTaskController.addMapDisplayAction(new DisplayProvincesOnSquaremapAction());
}
if(getServer().getPluginManager().isPluginEnabled("BlueMap")){
try {
info("Found BlueMap. Enabling BlueMap integration.");
Expand Down
Loading