Class PlayerStartDiggingEvent

java.lang.Object
net.minestom.server.event.player.PlayerStartDiggingEvent
All Implemented Interfaces:
Event, BlockEvent, CancellableEvent, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent

public class PlayerStartDiggingEvent extends Object implements PlayerInstanceEvent, BlockEvent, CancellableEvent
Called when a Player start digging a block, can be used to forbid the Player from mining it.

Be aware that cancelling this event does not necessary prevent the player from breaking the block (could be because of high latency or a modified client) so cancelling PlayerBlockBreakEvent is also necessary. Could be fixed in future Minestom version.