[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, |
Comment by md_5 [ 29/Jan/22 ] |
What's the use case? |
Comment by FreeSoccerHDX [ 24/Jan/22 ] |
Made an PR |
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?). |