Open nicolube opened 1 month ago
Can you please attach code for reproduction ?
@EventHandler
public void onBlockBreakEvent(BlockBreakEvent event) {
event.setDropItems(false);
}
I would consider setting the event priority. The events are sorted and called by Bukkit in the following order: LOWEST -> LOWEST -> NORMAL -> HIGH -> HIGHEST -> MONITOR See: https://jd.papermc.io/paper/1.21.1/org/bukkit/event/EventHandler.html
I would consider setting the event priority. The events are sorted and called by Bukkit in the following order: LOWEST -> LOWEST -> NORMAL -> HIGH -> HIGHEST -> MONITOR See: https://jd.papermc.io/paper/1.21.1/org/bukkit/event/EventHandler.html
BlockBreakEvent with instabreak falg is called by PlotSquared... And is executes breakNaturally when not cancled... Does not check if dropItems is disabled...
I would suggest u check before proposing a solution that will not work. https://github.com/IntellectualSites/PlotSquared/blob/main/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener.java#L523
For instabreak P2 uses Block#breakNaturally and I do not know what event(s) that would send, and what it would be determined as have being "done" by
Would u guys just look 2 mins at ur own code before replying? The this is a very simple issue and easy to fix.
We don't make any guarantees about what information is used from the BlockBreakEvent. I guess this is a feature request then. Feel free to open a PR.
Well, is this a feature request or a bug?
Well, I would say it is most definitely a bug, when calling Bukkit-evnets, the behavior of the event should mimic Bukkit as closely as possible.
If're not doing that, u break other plugins.
Which events are being called at an block break by a player?\ As far as I know...
Well to be super correct, the BlockDropItems event should also be called when makeing a fake block break by an player
Server Implementation
Paper
Server Version
1.20
Describe the bug
Instabreak dropes items when disabled in BlockBreakEvent.
To Reproduce
Expected behaviour
Items only stopping when blockbreak event says it should
Screenshots / Videos
No response
Error log (if applicable)
No response
Plot Debugpaste
https://athion.net/ISPaster/paste/view/14b8c2d536ca470293e0f3a37ec0bbab
PlotSquared Version
7.3.12-SNAPSHOT
Checklist
Anything else?
Compiled form latest src