Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Entity removal upon town unclaim/deletion #5953

Closed
Parthodys opened this issue Jun 10, 2022 · 3 comments · Fixed by #5992
Closed

Suggestion: Entity removal upon town unclaim/deletion #5953

Parthodys opened this issue Jun 10, 2022 · 3 comments · Fixed by #5992

Comments

@Parthodys
Copy link

Please explain your feature request to the best of your abilities:

Currently the delete upon unclaim and regeneration for towns seem to only support blocks, but this leaves things likes armor stands, end crystals, animals and unremoved mobs out of the removals.

It leaves nasty looking floating armor stands, end crystals and mass animal farms behind even after the town is deleted and regenerated back to wild.

However, entities that are underground seem to still get replaced by the regeneration system when it restores the mined blocks and animals may suffocate too, which is good in this regard.

I think if possible, it would be great if Towny would support removal of such entities as well.

@LlmDl
Copy link
Member

LlmDl commented Jun 10, 2022

Have you tried putting them in to the world's plotManagementDeleteIds?

@LlmDl
Copy link
Member

LlmDl commented Jun 10, 2022

END_CRYSTAL and ARMOR_STAND would be the materials to try.

@LlmDl
Copy link
Member

LlmDl commented Jun 13, 2022

6a27132 is going to be used for this

LlmDl added a commit that referenced this issue Jun 30, 2022
Allows Towny to delete all Entities of a given type from a TownBlock
when it is unclaimed by a town.

New Config Options:
 - new_world_settings.plot_management.entity_delete.enabled
   - Default: false
 - new_world_settings.plot_management.entity_delete.unclaim_delete
   - Default: "ENDERCRYSTAL"
   - These entities will be deleted upon a plot being unclaimed

Closes #5953.
@LlmDl LlmDl added this to the 0.98.4.0 milestone Jul 19, 2022
LlmDl added a commit that referenced this issue Jul 19, 2022
* Add unclaimEntityTypeDelete to TownyWorld.

Allows Towny to delete all Entities of a given type from a TownBlock
when it is unclaimed by a town.

New Config Options:
 - new_world_settings.plot_management.entity_delete.enabled
   - Default: false
 - new_world_settings.plot_management.entity_delete.unclaim_delete
   - Default: "ENDERCRYSTAL"
   - These entities will be deleted upon a plot being unclaimed

Closes #5953.

* Fix typos, add links to Spigot javadoc for reference.

* Change setting TownyWorld's entities to replace if null.
LlmDl added a commit that referenced this issue Jul 19, 2022
    - Allows Towny to delete all Entities of a given type from a
TownBlock when it is unclaimed by a town.
    - Closes #5953.
  - New Config Options:
    - new_world_settings.plot_management.entity_delete.enabled
      - Default: false
    - new_world_settings.plot_management.entity_delete.unclaim_delete
      - Default: "ENDERCRYSTAL"
      - These entities will be deleted upon a plot being unclaimed
@LlmDl LlmDl self-assigned this Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants