Class PlayerBlockBreakEvents

java.lang.Object
net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents

public final class PlayerBlockBreakEvents extends Object
  • Field Details

    • BEFORE

      public static final Event<PlayerBlockBreakEvents.Before> BEFORE
      Callback before a block is broken. Only called on the server, however updates are synced with the client.

      If any listener cancels a block breaking action, that block breaking action is cancelled and CANCELED event is fired. Otherwise, the AFTER event is fired.

    • AFTER

      public static final Event<PlayerBlockBreakEvents.After> AFTER
      Callback after a block is broken.

      Only called on a logical server.

    • CANCELED

      public static final Event<PlayerBlockBreakEvents.Canceled> CANCELED
      Callback when a block break has been canceled.

      Only called on a logical server. May be used to send packets to revert client-side block changes.