Class PlayerCancelDiggingEvent

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

public class PlayerCancelDiggingEvent extends Object implements PlayerInstanceEvent, BlockEvent
Called when a Player stops digging a block before it is broken
  • Constructor Details

    • PlayerCancelDiggingEvent

      public PlayerCancelDiggingEvent(@NotNull @NotNull Player player, @NotNull @NotNull Block block, @NotNull @NotNull BlockVec blockPosition)
  • Method Details

    • getBlock

      @NotNull public @NotNull Block getBlock()
      Gets the block which was being dug.
      Specified by:
      getBlock in interface BlockEvent
      Returns:
      the block
    • getBlockPosition

      @NotNull public @NotNull BlockVec getBlockPosition()
      Gets the block position.
      Specified by:
      getBlockPosition in interface BlockEvent
      Returns:
      the block position
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player