Class ProximityUtil
java.lang.Object
com.palmergames.bukkit.towny.utils.ProximityUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
allowTownClaimOrThrow
(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost) static void
allowTownClaimOrThrow
(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost, boolean trade) static void
allowTownHomeBlockOrThrow
(TownyWorld world, Coord key, @Nullable Town town, boolean newTown) static void
allowTownUnclaimOrThrow
(TownyWorld world, WorldCoord townBlockToUnclaim, @Nullable Town town) gatherOutOfRangeTowns
(Nation nation) gatherOutOfRangeTowns
(Nation nation, Town capital) static boolean
isTownCloseEnoughToNation
(Town town, Town newCapital, List<Town> townsToCheck, List<Town> validTowns) static boolean
isTownTooFarFromNation
(Town town, Town newCapital, List<Town> towns) static void
removeOutOfRangeTowns
(Nation nation) static void
testAdjacentAddDistrictRulesOrThrow
(WorldCoord townBlockToClaim, Town town, District district, int minAdjacentBlocks) static void
testAdjacentClaimsRulesOrThrow
(WorldCoord townBlockToClaim, Town town, boolean outpost) static void
testAdjacentClaimsRulesOrThrow
(WorldCoord townBlockToClaim, Town town, boolean outpost, int minAdjacentBlocks) static void
testAdjacentRemoveDistrictRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town, District district, int minAdjacentBlocks) static void
testAdjacentUnclaimsRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town) static void
testAdjacentUnclaimsRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town, int minAdjacentBlocks) static void
testTownProximityToNation
(Town town, Nation nation)
-
Constructor Details
-
ProximityUtil
public ProximityUtil()
-
-
Method Details
-
allowTownHomeBlockOrThrow
public static void allowTownHomeBlockOrThrow(TownyWorld world, Coord key, @Nullable @Nullable Town town, boolean newTown) throws TownyException - Throws:
TownyException
-
allowTownClaimOrThrow
public static void allowTownClaimOrThrow(TownyWorld world, WorldCoord townBlockToClaim, @Nullable @Nullable Town town, boolean outpost) throws TownyException - Throws:
TownyException
-
allowTownClaimOrThrow
public static void allowTownClaimOrThrow(TownyWorld world, WorldCoord townBlockToClaim, @Nullable @Nullable Town town, boolean outpost, boolean trade) throws TownyException - Throws:
TownyException
-
testAdjacentClaimsRulesOrThrow
public static void testAdjacentClaimsRulesOrThrow(WorldCoord townBlockToClaim, Town town, boolean outpost) throws TownyException - Throws:
TownyException
-
testAdjacentClaimsRulesOrThrow
public static void testAdjacentClaimsRulesOrThrow(WorldCoord townBlockToClaim, Town town, boolean outpost, int minAdjacentBlocks) throws TownyException - Throws:
TownyException
-
allowTownUnclaimOrThrow
public static void allowTownUnclaimOrThrow(TownyWorld world, WorldCoord townBlockToUnclaim, @Nullable @Nullable Town town) throws TownyException - Throws:
TownyException
-
testAdjacentUnclaimsRulesOrThrow
public static void testAdjacentUnclaimsRulesOrThrow(WorldCoord townBlockToUnclaim, Town town) throws TownyException - Throws:
TownyException
-
testAdjacentUnclaimsRulesOrThrow
public static void testAdjacentUnclaimsRulesOrThrow(WorldCoord townBlockToUnclaim, Town town, int minAdjacentBlocks) throws TownyException - Throws:
TownyException
-
testAdjacentAddDistrictRulesOrThrow
public static void testAdjacentAddDistrictRulesOrThrow(WorldCoord townBlockToClaim, Town town, District district, int minAdjacentBlocks) throws TownyException - Throws:
TownyException
-
testAdjacentRemoveDistrictRulesOrThrow
public static void testAdjacentRemoveDistrictRulesOrThrow(WorldCoord townBlockToUnclaim, Town town, District district, int minAdjacentBlocks) throws TownyException - Throws:
TownyException
-
testTownProximityToNation
- Throws:
TownyException
-
gatherOutOfRangeTowns
-
gatherOutOfRangeTowns
-
isTownCloseEnoughToNation
-
removeOutOfRangeTowns
-
isTownTooFarFromNation
-