Class PlayerChangedMainHandEvent


  • public class PlayerChangedMainHandEvent
    extends PlayerEvent
    Called when a player changes their main hand in the client settings.
    • Constructor Detail

      • PlayerChangedMainHandEvent

        public PlayerChangedMainHandEvent​(@NotNull
                                          @NotNull Player who,
                                          @NotNull
                                          @NotNull MainHand mainHand)
    • Method Detail

      • getMainHand

        @NotNull
        public @NotNull MainHand getMainHand()
        Gets the new main hand of the player. The old hand is still momentarily available via HumanEntity.getMainHand().
        Returns:
        the new MainHand of the player
      • getHandlerList

        @NotNull
        public static @NotNull HandlerList getHandlerList()