diff --git a/pom.xml b/pom.xml
index 9bd575e..a7723d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.aubrithehuman
TownyRangeLimit
- 1.0-SNAPSHOT
+ 1.0.1
jar
TownyRangeLimit
@@ -77,7 +77,7 @@
com.github.LlmDl
Towny
- 0.98.3.3
+ 0.98.6.0
provided
diff --git a/src/main/java/org/aubrithehuman/townyrangelimit/TownyRangeLimit.java b/src/main/java/org/aubrithehuman/townyrangelimit/TownyRangeLimit.java
index 9b92036..f6445fb 100644
--- a/src/main/java/org/aubrithehuman/townyrangelimit/TownyRangeLimit.java
+++ b/src/main/java/org/aubrithehuman/townyrangelimit/TownyRangeLimit.java
@@ -110,9 +110,9 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
/**
* Finds the shortest distance (in townblocks) between two towns
- * @param town1
- * @param town2
- * @return
+ * @param town1 town1
+ * @param town2 town1
+ * @return shortest distance
*/
private static int shortestDistance(Town town1, Town town2) {
//max possible range (60M*sqrt2)
@@ -143,7 +143,7 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
}
}
- //if we didnt find anything for some reason? idk its worth putting
+ //if we didn't find anything for some reason? IDK its worth putting
if(nearestInviter == null) {
return dist;
}
@@ -177,9 +177,9 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
/**
* Finds the shortest distance (in townblocks) between a town and a nation
- * @param town
- * @param nation
- * @return
+ * @param town town
+ * @param nation nation
+ * @return shortest distance
*/
private static int shortestDistance(Town town, Nation nation) {
//max possible range (60M*sqrt2)
@@ -190,10 +190,10 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
ArrayList clusterInvited = getCluster(town.getHomeBlock().getWorldCoord());
WorldCoord invitedHomeblock = town.getHomeBlock().getWorldCoord();
- //Grab all of the towns in the nation
+ //Grab all the towns in the nation
List nation1Towns = nation.getTowns();
- ArrayList> clustersInviter = new ArrayList>();
- ArrayList inviterHomeblocks = new ArrayList();
+ ArrayList> clustersInviter = new ArrayList<>();
+ ArrayList inviterHomeblocks = new ArrayList<>();
for (Town t : nation1Towns) {
clustersInviter.add(getCluster(nation.getCapital().getHomeBlock().getWorldCoord()));
//grab homeblocks
@@ -221,7 +221,7 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
}
}
- //if we didnt find anything for some reason? idk its worth putting
+ //if we didn't find anything for some reason? IDK its worth putting
if(nearestInvited == null) {
return dist;
}
@@ -255,9 +255,9 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
/**
* Finds the shortest distance (in townblocks) between two nations
- * @param nation1
- * @param nation2
- * @return
+ * @param nation1 nation1
+ * @param nation2 nation2
+ * @return shortest distance
*/
private static int shortestDistance(Nation nation1, Nation nation2) {
@@ -267,20 +267,20 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
if (nation1 != null && nation2 != null) {
try {
- //Grab all of the towns in the nation
+ //Grab all the towns in the nation
List nation1Towns = nation1.getTowns();
- ArrayList> clustersInviter = new ArrayList>();
- ArrayList inviterHomeblocks = new ArrayList();
+ ArrayList> clustersInviter = new ArrayList<>();
+ ArrayList inviterHomeblocks = new ArrayList<>();
for (Town t : nation1Towns) {
clustersInviter.add(getCluster(nation1.getCapital().getHomeBlock().getWorldCoord()));
inviterHomeblocks.add(t.getHomeBlock().getWorldCoord());
}
- //Grab all of the towns in the nation
+ //Grab all the towns in the nation
List nation2Towns = nation2.getTowns();
- ArrayList> clustersInvited = new ArrayList>();
- ArrayList invitedHomeblocks = new ArrayList();
+ ArrayList> clustersInvited = new ArrayList<>();
+ ArrayList invitedHomeblocks = new ArrayList<>();
for (Town t : nation2Towns) {
clustersInvited.add(getCluster(nation2.getCapital().getHomeBlock().getWorldCoord()));
invitedHomeblocks.add(t.getHomeBlock().getWorldCoord());
@@ -288,7 +288,7 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
}
//This may take forever :skull: at like multiple 900 size towns it takes like 1mil iterations?????
- //idk how tf else to check this
+ //IDK how tf else to check this
//find nearest block to invited homeblock
WorldCoord nearestInvited1 = null;
@@ -368,12 +368,12 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
/**
*
- * @param worldCoord
- * @return
+ * @param worldCoord worldCoord
+ * @return List of connected chunks
* @author NinjaMandalorian
*/
private static ArrayList getAdjCells(WorldCoord worldCoord) {
- ArrayList ReturnList = new ArrayList();
+ ArrayList ReturnList = new ArrayList<>();
int[][] XZarray = new int[][]{
{-1, 0},
@@ -399,8 +399,8 @@ public final class TownyRangeLimit extends JavaPlugin implements Listener {
*/
public static ArrayList getCluster(WorldCoord chunkCoord){
// WCoordList is the returning array, SearchList is the to-search list.
- ArrayList WCoordList = new ArrayList();
- ArrayList SearchList = new ArrayList();
+ ArrayList WCoordList = new ArrayList<>();
+ ArrayList SearchList = new ArrayList<>();
SearchList.add(chunkCoord); // Adds 1st chunk to list
// Iterates through SearchList, to create a full list of every adjacent cell.