Class ClientHotbarScrollEvents

java.lang.Object
net.fabricmc.fabric.api.event.client.player.ClientHotbarScrollEvents

public final class ClientHotbarScrollEvents extends Object
Events pertaining to using the scroll wheel in the hotbar to change the selected item.
  • Field Details

    • ALLOW

      public static final Event<ClientHotbarScrollEvents.Allow> ALLOW
      An event that checks whether the player's scrolling will change the selected hotbar slot.

      Returning false cancels the hotbar selection change without running anymore registered callbacks.

    • BEFORE

      public static final Event<ClientHotbarScrollEvents.Before> BEFORE
      An event that is invoked before player scrolling changes the selected hotbar slot.

      This event is only fired if the result of ALLOW is true.

    • AFTER

      public static final Event<ClientHotbarScrollEvents.After> AFTER
      An event that is invoked after player scrolling changes the selected hotbar slot.

      This event is only fired if the result of ALLOW is true.