Java8 / Unix, tested on several version (Spigot / Paper) without any plugins too.
CraftBukkit version git-Spigot-56f8471-43183ea (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
When breaking a block using an empty hand, or a stick, or a stone, or a cobble, ...
(in fact all non-specific tools), the result of BlockBreakEvent.getBlock().getDrops() is not always correct.
- If you break a DIAMOND_ORE, it will return DIAMOND (should be nothing)
- If you break a STONE, it will return COBBLESTONE (should be nothing)
[ FYI, BlockDropItemEvent.getItems() (deprecated event) return value is correct. ]
Read this topic for more details:
(it also contains the main part of the source code of the attached testable plugin + results I got with)
(to quickly test this bug)
- Put the jar in plugins folder
- Start the server
- Connect to it as a player
- Break a block
- Read the console output
You'll see a difference between what the console say ("Result drops" = return of method BlockBreakEvent.getBlock().getDrops()) and what is effectively dropped to the ground.
- All blocks (like dirt) which could be break without a specific tools will be same.
- All blocks (like DIAMOND_ORE) which require a specific tools will differ.
You can see examples of what I've tested by extending the "spoiler" tag in the topic mentioned above.