Class PlayerSwitchHotbarSlotEvent

Direct Known Subclasses:
PlayerSwitchHotbarSlotEvent.Post, PlayerSwitchHotbarSlotEvent.Pre

public abstract class PlayerSwitchHotbarSlotEvent extends PlayerEvent

Fired when a player switches the hotbar slot either by mouse scroll or keyboard input.

This event is fired on the game bus on the server side. If the server doesn't receive the packet, neither of the two events will be fired.

See Also:
  • Field Details

    • oldSlotIndex

      private final int oldSlotIndex
    • newSlotIndex

      private final int newSlotIndex
  • Constructor Details

    • PlayerSwitchHotbarSlotEvent

      private PlayerSwitchHotbarSlotEvent(Player player, int oldSlotIndex, int newSlotIndex)
  • Method Details

    • getOldSlotIndex

      public int getOldSlotIndex()
    • getNewSlotIndex

      public int getNewSlotIndex()