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
Adds support for Shopkeeper plugin #1200
Conversation
Like I do with PrettySimpleShop, the shop plugin should probably not ignore the event if it's canceled. This will also automatically make it compatible with other region plugins as well. There are no use cases that I know of where you'd want a plugin to blanket-deny access to shops. Though - if you're trying to avoid the error message, then it should listen at a lower priority and cancel. |
This incites plugins to disregard the incremental checks & cancellation the API provides to have plugins like GP work in the first place. It is not the responsibility of higher priority plugins to accommodate, as part of their normal flow of operation, quirks of lower priority protection plugins because of their lack of ability to create check exclusion rules. GP has neither declarative (YAML) or API ways to request a specific type of entity and/or metadata to bypass checks, and that's a shame. If this PR was made generic and allows for configurable
There is no lower level than |
event priorities will be changed in v19 (or whenever the event funnel is implemented). This will also include a way to make GP ignore based on whatever you want as well. See dev/v20 branch for an example of such an implementation. I'll take a PR to move it to LOW though. (That being said, there is a guarantee - if your plugin loads/registers before another, then your event handler will fire before another on the same priority; you can also
That's coming with v18. |
I could also accept a PR like this in the meantime, probably without a config option I guess. |
I happen to come across this PR (I have several plugin users that run into the issue this PR intends to resolve from time to time) and wanted to note that I might have come up with another (and more generally applicable) solution. Edit: However, regardless of this particular issue potentially being resolved then, this shouldn't hinder GriefPrevention to reconsider its used event priorities. For instance, if I remember correctly, WorldGuard uses normal event priorities for its checks, thereby allowing other plugins to pick if they want to execute before that (and thereby providing behavior that is more specific than the quite general land protection behavior) or after that (to take into account if the event has already been cancelled by another plugin). |
Yea, very likely will be moving checks to LOW priority. |
Adds support for Shopkeeper plugin (#145)
Checks if the entity is a shopkeeper with metadata and added an entry in the config.