程序包 org.bukkit.event.player

# 类 PlayerChangedMainHandEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerChangedMainHandEvent

public class PlayerChangedMainHandEvent extends PlayerEvent
当玩家在客户端设置改变主手时触发本事件.

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 org.bukkit.event.Event

  `Event.Result`

- ## 字段概要

  ### 从类继承的字段 org.bukkit.event.player.PlayerEvent

  `player`

- ## 构造器概要

  构造器
  构造器
  说明
  `PlayerChangedMainHandEvent(@NotNull Player who, @NotNull MainHand mainHand)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `static @NotNull HandlerList`
  `getHandlerList()`
  `@NotNull HandlerList`
  `getHandlers()`
  `@NotNull MainHand`
  `getMainHand()`
  获取玩家的新主手.旧的主手依然可以在此期间通过 `HumanEntity.getMainHand()` 获取到.

  ### 从类继承的方法 org.bukkit.event.player.PlayerEvent

  `getPlayer`

  ### 从类继承的方法 org.bukkit.event.Event

  `getEventName, isAsynchronous`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### PlayerChangedMainHandEvent

    public PlayerChangedMainHandEvent(@NotNull @NotNull Player who, @NotNull @NotNull MainHand mainHand)

- ## 方法详细资料

  - ### getMainHand

    @NotNull public @NotNull MainHand getMainHand()
    获取玩家的新主手.旧的主手依然可以在此期间通过 `HumanEntity.getMainHand()` 获取到.

    原文:Gets the new main hand of the player. The old hand is still momentarily available via `HumanEntity.getMainHand()`.

    返回:
      玩家的新`MainHand`

  - ### getHandlers

    @NotNull public @NotNull HandlerList getHandlers()
    指定者:
      `getHandlers` 在类中 `Event`

  - ### getHandlerList

    @NotNull public static @NotNull HandlerList getHandlerList()