Skip to content

Skip proximity checks when minimum plot distance is set to 0#8087

Merged
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
MakcNmk:master
Jan 24, 2026
Merged

Skip proximity checks when minimum plot distance is set to 0#8087
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
MakcNmk:master

Conversation

@MakcNmk
Copy link
Copy Markdown
Contributor

@MakcNmk MakcNmk commented Jan 24, 2026

Description:

Early return optimization for AreaSelectionUtil.filterInvalidProximityTownBlocks()


New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

Copy link
Copy Markdown
Member

@LlmDl LlmDl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's other types of min distance measurements, as well as a max distance setting. Does this break functionality for servers which use those but not the setting you're bypassing for?

@MakcNmk
Copy link
Copy Markdown
Contributor Author

MakcNmk commented Jan 24, 2026

No, this should not break functionality in any way, as my commit only eliminates unnecessary checks, which when there are a large number of TownBlocks, simply crash the server.

Copy link
Copy Markdown
Member

@LlmDl LlmDl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you are correct, thank you the Pull Request.

@LlmDl LlmDl added this to the 0.103.0.0 milestone Jan 24, 2026
@LlmDl LlmDl merged commit c90ae76 into TownyAdvanced:master Jan 24, 2026
1 check passed
LlmDl added a commit that referenced this pull request Jan 24, 2026
  - Bump me.clip:placeholderapi from 2.11.6 to 2.11.7.
  - Bump org.apache.commons:commons-compress from 1.26.2 to 1.28.0.
  - Fix the mayor succession event not being fired, courtesy of Warrior
with PR #8086.
  - Skip proximity checks when minimum plot distance is set to 0,
courtesy of MakcNmk with PR #8087. (First-Time Contributor!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants