[SPIGOT-2652] method for making a player break a block. Created: 02/Sep/16 Updated: 06/Feb/22 Resolved: 06/Feb/22 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Fishey LP | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | block, drops, enchantment | ||
| Description |
|
player.breakBlock(Block b); // Uses item in main hand, returns true if it was successful. It would work like normal breaking: BlockBreakEvent get's called, tool uses durability, block drops items. |
| Comments |
| Comment by Marvin Rieple [ 06/Feb/22 ] |
|
An api was added in 1.17 with this commit: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/cc9610b737e00e5e3a5c7800364d4f2e83266991 |
| Comment by Fishey LP [ 02/Sep/16 ] |
|
Oops, tags are from an issue posted before. |