Class ProximityUtil
java.lang.Object
com.palmergames.bukkit.towny.utils.ProximityUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidallowTownClaimOrThrow(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost) static voidallowTownClaimOrThrow(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost, boolean trade) static voidallowTownHomeBlockOrThrow(TownyWorld world, Coord key, @Nullable Town town, boolean newTown) static voidallowTownUnclaimOrThrow(TownyWorld world, WorldCoord townBlockToUnclaim, @Nullable Town town) gatherOutOfRangeTowns(Nation nation) gatherOutOfRangeTowns(Nation nation, Town capital) static booleanisTownCloseEnoughToNation(Town town, Town newCapital, List<Town> townsToCheck, List<Town> validTowns) static booleanisTownTooFarFromNation(Town town, Town newCapital, List<Town> towns) static voidremoveOutOfRangeTowns(Nation nation) static voidtestAdjacentAddDistrictRulesOrThrow(WorldCoord townBlockToClaim, Town town, District district, int minAdjacentBlocks) static voidtestAdjacentClaimsRulesOrThrow(WorldCoord townBlockToClaim, Town town, boolean outpost) static voidtestAdjacentClaimsRulesOrThrow(WorldCoord townBlockToClaim, Town town, boolean outpost, int minAdjacentBlocks) static voidtestAdjacentRemoveDistrictRulesOrThrow(WorldCoord districtCoordBeingRemoved, Town town, District district, int minAdjacentBlocks) static voidtestAdjacentUnclaimsRulesOrThrow(WorldCoord townBlockToUnclaim, Town town) static voidtestAdjacentUnclaimsRulesOrThrow(WorldCoord townBlockToUnclaim, Town town, int minAdjacentBlocks) static voidtestTownProximityToNation(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 districtCoordBeingRemoved, Town town, District district, int minAdjacentBlocks) throws TownyException - Throws:
TownyException
-
testTownProximityToNation
- Throws:
TownyException
-
gatherOutOfRangeTowns
-
gatherOutOfRangeTowns
-
isTownCloseEnoughToNation
-
removeOutOfRangeTowns
-
isTownTooFarFromNation
-