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

[feature] Support wildcards for anti_build like in essentials #224

Closed
1 task done
phaldan opened this issue Dec 11, 2024 · 2 comments
Closed
1 task done

[feature] Support wildcards for anti_build like in essentials #224

phaldan opened this issue Dec 11, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@phaldan
Copy link
Contributor

phaldan commented Dec 11, 2024

Is there an existing request for feature?

  • I have searched the existing issues

What feature would you like?

Thx for all the work you have put into this mod. I have a small feature request.

I would like to disable by default placing any kind of blocks. The anti_build modules with place_block technically already supports this, but I have to add a list of all the available blocks. Essentials has a way to achieve this by using a wildcard (See Permission Control on https://wiki.ess3.net/wiki/AntiBuild).

This would be interesting for all types of anti_build (break_block, place_block, interact_item, interact_block, interact_entity).

A config could look like:

{
  "anti": {
    "place_block": true
  }
}

Alternative:

{
  "anti": {
    "place_block": {
      "all": true
    }
  }
}

Another:

{
  "anti": {
    "place_block": {
      "id": ["*"]
    }
  }
}

Anything else?

No response

@phaldan phaldan added the enhancement New feature or request label Dec 11, 2024
@sakurawald
Copy link
Owner

Hello, thanks for you report. This would be a good thing to have, but i recently have no time until 2025 middle, this would be done after that.

@sakurawald sakurawald added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 11, 2024
@phaldan
Copy link
Contributor Author

phaldan commented Dec 11, 2024

The main change would be in "AntiBuildInitializer". I can create a small PR to introduce this feature. Do you prefer one of the config variants?

sakurawald added a commit that referenced this issue Dec 12, 2024
feature: add wildcard to anti_build (resolves #224)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants