[SPIGOT-6910] A BlockBreakStart/End Event Created: 23/Jan/22  Updated: 01/Feb/22  Resolved: 01/Feb/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Boran Akinci Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: Event, Feature, Packet

Version: 1.18.1 (newest)
Guidelines Read: Yes

 Description   

BlockBreakStartEvent and BlockBreakEndEvent should depend on what packet is being sent

According to the wiki BlockBreakStart would trigger when value is 0 and BlockBreakEndEvent would trigger when the value is 1 or 2. Mostly 1 since 2 is already an event (BlockBreakEvent)



 Comments   
Comment by FreeSoccerHDX [ 29/Jan/22 ]

Currently you have to use packets to track this. 

You can use this Event to track the Time that the player breaked a Block,
and this can be used for custom blocks that are added with resource pack (you can simulate specific block-break speed)
Also it would be nice to have it for saving the total block damage time for minigames for examle. 
There are more reasons and it would make coding stuff more easy since it wont need NMS/Packets anymore.

Comment by md_5 [ 29/Jan/22 ]

What's the use case?

Comment by FreeSoccerHDX [ 24/Jan/22 ]

Made an PR
Craftbukkit just needs some love of someone who loves those patches things.

Comment by FreeSoccerHDX [ 23/Jan/22 ]

Everything for this exist in net.minecraft.server.level.ServerPlayerGameMode or with other mappings net/minecraft/server/level/PlayerInteractManager.

I don't understand why this is not already added. Only thing that exist is BlockDamageEvent which gets called once when starting. Maybe its enought to have a BlockBreakStopEvent ? which has different cases (aborting or block breaks or block switch?). 

Generated at Sun Mar 30 02:36:46 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.