-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
Add entity placing and breaking flags (Fixes WORLDGUARD-4080) #417
base: master
Are you sure you want to change the base?
Conversation
I'm using self written plugins to override the worldguard stuff:
Works perfectly fine for me for block place, block break, pvp and more |
I realise that this can be done in an external plugin too (but so can many other things already provided by WG itself) Also doing that in an external plugin the way you describe it would introduce a good amount of unnecessary additional logic while providing it directly in the plugin itself keeps the necessary checks to a minimum. Also adding a new flag was the suggested solution to the issue so I just did that. 😉 |
so, few random thoughts: |
Well tbh. I don't like the current solution either, mainly because it has limitations, some of which you pointed out already. But it works so it's enough for my future use-case for now: allow spawn egg usage in regions that have build (not mob spawning) blocked for event usage. An alternative to this approach could be to mirror the vehicle more closely and directly add an "allow spawnegg usage" flag. (but I took the opportunity of making them more general than just spawneggs) My main issues with the current flag system which I noticed again when trying to add that are also similar to yours: The inability to properly specify the overrides to actually be able to specify each situation. And I don't think the solution can be to just add more flags to override existing ones as afaik. it would still not be possible to specify all possible combinations e.g. for members and non-members, and don't let me get into allowing specific mobs to override/bypass certain flags. I feel like the whole flag system is missing a component that allows for the flag to know the context in which it is queried and to be able to respond to them in different ways which results in this quite unwieldy override system. An approach that is more similar to LuckPerms's and Sponge's context might be better suited in the long run. |
yea, that's essentially what sk was doing with rule lists. essentially you could make a flexible blacklist-entry-like rule that could be applied to regions. flags were just to be implemented as pre-written rules. |
This implements two new flags (
entity-place
andentity-destroy
) which allow specifying which entities can be placed or destroyed in a region even though the player does not have build rights. This resolves issue 4080.It also displays the actual entity name when placing or destroying is cancelled instead of a general "things", fixes a comment and removes an unnecessary check for drops (which is handled before already)