From a8c873214cfe3c33bd89e22ad42fb4a0031af414 Mon Sep 17 00:00:00 2001 From: CorruptedGreed Date: Sun, 11 Feb 2024 01:40:23 -0700 Subject: [PATCH] Cancel out takeoverWouldCutATownIntoTwoSections boolean Issues with towns not being able to takeoverclaim in instances where the overclaimed town would not be split into two. --- .../com/palmergames/bukkit/towny/command/TownCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java b/Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java index d7be17be99..e2436f830f 100644 --- a/Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java +++ b/Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java @@ -3660,11 +3660,11 @@ private void parseTownTakeoverClaimCommand(Player player) throws TownyException // Prevent straight line claims if configured, and the town has enough townblocks claimed, and this is not an outpost. ProximityUtil.testAdjacentClaimsRulesOrThrow(wc, town, false); - +/* // Prevent claiming that would cut off a section of a town from the main body. if (takeoverWouldCutATownIntoTwoSections(wc, town)) throw new TownyException(Translatable.of("msg_err_you_cannot_over_claim_would_cut_into_two")); - +*/ // Filter out stealing land that is too close to another Town's homeblock. if (TownySettings.isOverClaimingPreventedByHomeBlockRadius() && AreaSelectionUtil.isTooCloseToHomeBlock(wc, town)) throw new TownyException(Translatable.of("msg_too_close2", Translatable.of("homeblock"))); @@ -3680,7 +3680,7 @@ private void parseTownTakeoverClaimCommand(Player player) throws TownyException .setCost(new ConfirmationTransaction(() -> cost, town, "Takeover Claim (" + wc.toString() + ") from " + townName + ".")) .sendTo(player); } - +/* private boolean takeoverWouldCutATownIntoTwoSections(WorldCoord worldCoord, Town townOverClaiming) { // If the surrounding townblocks has at least 2 townblocks owned by the // overclaimed town and 1 plot that belongs to the wilderness or a third-town, @@ -3696,7 +3696,7 @@ private boolean takeoverWouldCutATownIntoTwoSections(WorldCoord worldCoord, Town .count(); return wildOr3rdPartyOwned > 0; } - +*/ private void parseTownBankHistoryCommand(final Player player, String[] split) throws NoPermissionException, TownyException { checkPermOrThrow(player, PermissionNodes.TOWNY_COMMAND_TOWN_BANKHISTORY.getNode());