Skip to content

expand disallowed blocks to categories and copying#2942

Open
SamuraiWorf wants to merge 3 commits intoEngineHub:masterfrom
SamuraiWorf:feat/disallowed-blocks
Open

expand disallowed blocks to categories and copying#2942
SamuraiWorf wants to merge 3 commits intoEngineHub:masterfrom
SamuraiWorf:feat/disallowed-blocks

Conversation

@SamuraiWorf
Copy link
Copy Markdown
Contributor

Hiya! For a bit of context: I'm from zero.minr.org and we've been working on a WE fork the past few months to make it safer in order to open it up to a wide user base.
We felt it right to open up PRs on the non server-specific changes we made, in case you find any of them worth to add into WorldEdit.

This first one is meant to make the disallowed-blocks list work with block categories and //copy, //move, etc.
I think there are a couple things that are up for debate, f.e. where to put the config options, or whether calling WorldEdit.getInstance() is a terrible idea, but let me know what you think ^^

@SamuraiWorf SamuraiWorf requested a review from a team as a code owner April 7, 2026 22:01
@SamuraiWorf
Copy link
Copy Markdown
Contributor Author

No idea what to do about the api compatability. The reports seem to suggest that this has nothing to do with my PR.

@wizjany
Copy link
Copy Markdown
Collaborator

wizjany commented Apr 7, 2026

I don't think this makes sense to apply to source masks given the intent of the feature. It's a safety feature, not a security feature. That is, it doesnt make sense to prevent someone from creating a schematic (if they have permission to) with those blocks - they might just want to share the schematic and download it for use elsewhere. It's really just meant to prevent accidents like //set grass instead of //set grass_block (though the fact that people generally use op instead of assigning proper perms often makes this useless anyway...). I could see this logic applied to tags as well, but it would be in the form of a list of tags to disallow, not checking tags by the blocks they contain. (Also yea the implementation is really wasteful, grabbing config for every block is probably a lot of overhead)

@SamuraiWorf
Copy link
Copy Markdown
Contributor Author

Good call on the excessive worldEdit.getConfiguration() calls - fixed.

For us the feature certainly has been co-opted to also function as a security feature. But I get it if that's not the direction WorldEdit wants to take it.

As it stands, this is just a suggestion, I can remove the mask part, or we close the PR altogether, that's up to yall.

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