Skip to content

Add only_remove_claim_count for inactive resident claim limits#8119

Merged
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
EarthPol:only-remove-claims
Mar 9, 2026
Merged

Add only_remove_claim_count for inactive resident claim limits#8119
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
EarthPol:only-remove-claims

Conversation

@GoodrichDev
Copy link
Copy Markdown
Contributor

Description:

When delete_old_residents.enable, only_remove_town, and only_remove_claim_count are all true (and delete_only_townless is false), residents who are offline longer than deleted_after_time no longer count toward ratio-based max town blocks.

Resident data is kept: purge skips removing town/deleting residents in this mode.


New Nodes/Commands/ConfigOptions:

New Config Option:

  • Adds resident_settings.delete_old_residents.only_remove_claim_count.

Relevant Towny Issue ticket:

This does not address a towny ticket but a feature I think would be good in towny


  • 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.


  • Test showing it working

Settings showing 15 day limit with necessary options enabled
image

Town prior to setting
image

Resident inactive over 15+ days (setting)
image

Town after setting applied
image

Resident remained in town after new towny day executed

Adds resident_settings.delete_old_residents.only_remove_claim_count.

When delete_old_residents.enable, only_remove_town, and only_remove_claim_count are all true (and delete_only_townless is false), residents who are offline longer than deleted_after_time no longer count toward ratio-based max town blocks.

Resident data is kept: purge skips removing town/deleting residents in this mode.
@GoodrichDev GoodrichDev requested a review from LlmDl March 7, 2026 01:29
@LlmDl LlmDl added this to the 0.103.0.0 milestone Mar 9, 2026
@LlmDl LlmDl merged commit 4e76ee6 into TownyAdvanced:master Mar 9, 2026
1 check passed
LlmDl added a commit that referenced this pull request Mar 9, 2026
courtesy of GoodrichDev with PR #8119.
    - When delete_old_residents.enable, only_remove_town, and
only_remove_claim_count are all true (and delete_only_townless is
false),
      residents who are offline longer than deleted_after_time no longer
count toward ratio-based max town blocks.
    - Resident data is kept: purge skips removing town/deleting
residents in this mode.
  - New Config Option:
resident_settings.delete_old_residents.only_remove_claim_count
    - Default: false
    - When true (and only_remove_town is true) residents are kept and
only stop counting toward town claim limits after deleted_after_time.
  - Add /ta resident set for lastonline/registered with timestamp
validation, courtesy of GoodrichDev with PR #8120.
  - New Command: /ta resident <resident> set registered <timestamp>
    - Sets the resident registered time with the timestamp being a long.
  - New Command: /ta resident <resident> set lastonline <timestamp>
    - Sets the resident lastonline time with the timestamp being a long.
  - Bump org.bstats:bstats-bukkit from 3.1.0 to 3.2.1.
  - Add option to consider nation enemies as town outlaws, courtesy of
Captain-S0L0 with PR #8132. (First-Time Contributor!)
  - New Config Option: global_town_settings.consider_enemies_outlaws
    - Default: false
    - If set to true, when a town is in a nation any player in another
nation that the town's nation considers enemies will be considered an
outlaw in that town.
  - Improve NameValidation checks for banned names, courtesy of
Veyronity with PR #8133.
    - Prevents Towns and Nations being named with subcommands of /town
and /nation.
    - Replaced hard coded list with auto-populating list, which now also
includes TownyCommandAddonAPI subcommands.
  - Add cooldown on how often towns & nations can request a merge with
the same target, courtesy of Veyronity with PR #8134.
  - New Config Option: global_town_settings.merge_request_cooldown_time
    - Default: 60
    - Number of seconds that must pass before a town can send a merge
request to the same target.
  - New Config Option:
global_nation_settings.merge_request_cooldown_time
    - Default: 60
    - Number of seconds that must pass before a nation can send a merge
request to the same target.
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.

2 participants