|
17 | 17 |
|
18 | 18 | public class OutpostUtil { |
19 | 19 |
|
20 | | - /** |
21 | | - * Checks to make sure all requirements are met before an outpost can be claimed. |
22 | | - * Will check: |
23 | | - * - If there are not enough free outpost plots |
24 | | - * - If the Outpost does not meet a minimum-distance requirement |
| 20 | + /** |
| 21 | + * Checks to make sure all requirements are met before an outpost can be |
| 22 | + * claimed. Will check: <br> |
| 23 | + * |
| 24 | + * - If there are not enough free outpost plots<br> |
| 25 | + * - If the Outpost does not meet a minimum-distance requirement |
| 26 | + * |
| 27 | + * @param town Town the outpost belongs to |
| 28 | + * @param resident Resident establishing the outpost |
| 29 | + * @param world TownyWorld in which the outpost will be in |
| 30 | + * @param key Coordinates where the outpost would be established |
| 31 | + * @param isAdmin If the Resident is a Towny Administrator |
25 | 32 | * |
26 | | - * @param town - Town the outpost belongs to |
27 | | - * @param resident - Resident establishing the outpost |
28 | | - * @param world - TownyWorld in which the outpost will be in |
29 | | - * @param key - Coordinates where the outpost would be established |
30 | | - * @param isAdmin - If the Resident is a Towny Administrator |
31 | | - * @param isPlotSetOutpost - If a plot is already an outpost |
32 | | - * |
33 | 33 | * @return - Returns true if all required tests for outposts are met. |
34 | 34 | * @throws TownyException if a condition is not met. |
35 | 35 | */ |
36 | | - public static boolean OutpostTests(Town town, Resident resident, TownyWorld world, Coord key, boolean isAdmin, boolean isPlotSetOutpost) throws TownyException { |
| 36 | + public static boolean OutpostTests(Town town, Resident resident, TownyWorld world, Coord key, boolean isAdmin) throws TownyException { |
37 | 37 |
|
38 | 38 | // The config can be set up to dole out numbers of outposts to towns based on resident counts/belonging to a nation. |
39 | 39 | if (TownySettings.isOutpostsLimitedByLevels() && (town.getMaxOutpostSpawn() >= town.getOutpostLimit())) |
@@ -67,7 +67,7 @@ public static boolean OutpostTests(Town town, Resident resident, TownyWorld worl |
67 | 67 | throw new TownyException(Translatable.of("msg_err_not_close_enough_to_your_town_nearest_plot", distance, maxDistance)); |
68 | 68 | } |
69 | 69 | // Outposts can have a minimum required distance from other towns' townblocks. |
70 | | - int minDistance = world.getMinDistanceFromOtherTownsPlots(key, isPlotSetOutpost ? town : null); |
| 70 | + int minDistance = world.getMinDistanceFromOtherTownsPlots(key, town); |
71 | 71 | // Outposts can have a minimum required distance from other outposts. |
72 | 72 | if (minDistance < TownySettings.getMinDistanceFromTownPlotblocks() || |
73 | 73 | minDistance < TownySettings.getMinDistanceForOutpostsFromPlot()) |
|
0 commit comments