Package org.bukkit.event.player
Class PlayerChangedMainHandEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerChangedMainHandEvent
public class PlayerChangedMainHandEvent extends PlayerEvent
Called when a player changes their main hand in the client settings.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PlayerChangedMainHandEvent(Player who, MainHand mainHand)
-
Method Summary
Modifier and Type Method Description static HandlerList
getHandlerList()
HandlerList
getHandlers()
MainHand
getMainHand()
Gets the new main hand of the player.
-
Constructor Details
-
Method Details
-
getMainHand
Gets the new main hand of the player. The old hand is still momentarily available viaHumanEntity.getMainHand()
.- Returns:
- the new
MainHand
of the player
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-