Skip to content

Commit

Permalink
Update min. Towny version to 0.100.1.0. (#900)
Browse files Browse the repository at this point in the history
Take care of deprecations.
  • Loading branch information
LlmDl authored Mar 24, 2024
1 parent 0328875 commit 7ce5822
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<java.version>1.8</java.version>
<project.bukkitAPIVersion>1.13</project.bukkitAPIVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<towny.version>0.99.3.0</towny.version>
<towny.version>0.100.1.0</towny.version>
</properties>

<repositories>
Expand Down Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>com.palmergames.bukkit.towny</groupId>
<artifactId>towny</artifactId>
<version>0.99.3.0</version>
<version>0.100.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/gmail/goosius/siegewar/SiegeWar.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
public class SiegeWar extends JavaPlugin {

private static SiegeWar plugin;
private final String requiredTownyVersion = "0.99.3.0";
private final String requiredTownyVersion = "0.100.1.0";
private static final SiegeHUDManager siegeHUDManager = new SiegeHUDManager();
private final Object scheduler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public static void throwIfTownIsTooFarFromNationCapitalByDistance(Nation nation,
* @throws TownyException thrown if the town or nation capital has no Homeblock set.
*/
private static boolean isTownTooFarFromNationCapitalByDistance(Nation nation, Town town) throws TownyException {
return TownySettings.getNationRequiresProximity() > 0 && MathUtil.distance(nation.getCapital().getHomeBlock().getCoord(), town.getHomeBlock().getCoord()) > TownySettings.getNationRequiresProximity();
return TownySettings.getNationProximityToCapital() > 0 && MathUtil.distance(nation.getCapital().getHomeBlock().getCoord(), town.getHomeBlock().getCoord()) > TownySettings.getNationProximityToCapital();
}

/**
Expand All @@ -299,7 +299,7 @@ public static void throwIfTownIsTooFarFromNationCapitalByWorld(Nation nation, To
* @throws TownyException thrown if the town or nation capital has no Homeblock set.
*/
private static boolean isTownTooFarFromNationCapitalByWorld(Nation nation, Town town) throws TownyException {
return TownySettings.getNationRequiresProximity() > 0 && !nation.getCapital().getHomeBlock().getWorld().getName().equals(town.getHomeBlock().getWorld().getName());
return TownySettings.getNationProximityToCapital() > 0 && !nation.getCapital().getHomeBlock().getWorld().getName().equals(town.getHomeBlock().getWorld().getName());
}

public static boolean isInANonBesiegedTown(Location location) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static double getMoneyMultiplier(Town town) {
if(extraMoneyPercentage == 0) {
return 1;
} else {
return 1 + ((extraMoneyPercentage / 100) * (town.getLevelID() -1));
return 1 + ((extraMoneyPercentage / 100) * (town.getLevelNumber() -1));
}
}

Expand Down

0 comments on commit 7ce5822

Please sign in to comment.