Package org.bukkit.event.player
Class PlayerChangedMainHandEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerChangedMainHandEvent
Called when a player changes their main hand in the client settings.
- API Note:
- Obsolete and replaced by PlayerClientOptionsChangeEvent.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerChangedMainHandEvent(@NotNull Player player, @NotNull MainHand newMainHand) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListDeprecated, for removal: This API element is subject to removal in a future version.has never been functional since its implementation and simply returns the old main hand.Gets the new main hand of the player.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerChangedMainHandEvent
 
- 
- 
Method Details- 
getMainHandDeprecated, for removal: This API element is subject to removal in a future version.has never been functional since its implementation and simply returns the old main hand. The method is left in this broken state to not break compatibility with plugins that relied on this fact. UsegetNewMainHand()instead or migrate toPlayerClientOptionsChangeEvent.getMainHand().Gets the new main hand of the player. The old hand is still momentarily available viaHumanEntity.getMainHand().- Returns:
- the new MainHandof the player
 
- 
getNewMainHandGets the new main hand of the player.- Returns:
- the new MainHandof the player
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-