-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Event when a block support is broken #6258
base: stable
Are you sure you want to change the base?
Conversation
The name of the event seems a bit off, but I can't think of anything else to say in English |
What exactly do you mean by support? |
Support block, when the block holding the seeds, for example, is broken, this event is called for the seed block |
This could be very useful, but the name needs to be revised. Alternatively, why not modify the blockbreak event so that it can be called here? |
Messing with existing events would break BC. |
I don't think this is the best name for this type of event. In any case, changing the BlockBreak event isn't the best solution either. |
Really BlockBreakEvent itself is mis-named (it should be PlayerBlockBreakEvent). Removal of support isn't the only case in which a block will get destroyed without a player present. For example, water flowing into a block will destroy it, triggering this event. |
So what name could be representative? |
I don't have a problem with it personally. My only issue is that this will currently be called in cases where there wasn't any support to begin with. |
So why not create a PlayerBlockBreakEvent and a BlockBreakEvent ? |
That's a big change that will break a lot of plugins |
Yes, so why not do it for PM6? |
Just because we have a major version doesn't mean we should just break plugins. The benefits of making a BC break need to be weighed against the costs of changing it. |
I think we could implement this as The best way to do this would probably be to create a wrapper for |
Introduction
Currently, when a block is broken because its support is broken, we can't modify the drops as in blockbreakevent, which can create duplication bugs in our plugins
I've searched all the uses of the "useBreakOn" function without a player is linked to a broken block because its support has been broken