PlayerSwapHandItemsEvent
PlayerSwapHandItemsEvent
=> org.bukkit.event.Event
=> org.bukkit.event.player.PlayerEvent
=> org.bukkit.event.player.PlayerSwapHandItemsEvent
Called when a player swap items between main hand and off hand using thehotkey.当玩家按下热键交换主副手中物品时触发。译注:所谓“热键”,默认为F
键。玩家按下F
键交换主副手 中物品时触发本事件。
方法声明: public ItemStack getMainHandItem()
方法签名: ()Lorg/bukkit/inventory/ItemStack;
Gets the item switched to the main hand.@return item in the main hand该方法用于获取将要被换至主手中的物品堆。@return 将要被换至主手中的物品堆。
方法声明: public void setMainHandItem(@Nullable ItemStack mainHandItem)
方法签名: (Lorg/bukkit/inventory/ItemStack;)V
Sets the item in the main hand.@param mainHandItem new item in the main hand该方法用于设置将要被换至主手中的物品堆。@param mainHandItem 将要被换至主手中的物品堆。
方法声明: public ItemStack getOffHandItem()
方法签名: ()Lorg/bukkit/inventory/ItemStack;
Gets the item switched to the off hand.@return item in the off hand该方法用于获取将要被换至副手中的物品堆。@return 将要被换至副手中的物品堆。
方法声明: public void setOffHandItem(@Nullable ItemStack offHandItem)
方法签名: (Lorg/bukkit/inventory/ItemStack;)V
Sets the item in the off hand.@param offHandItem new item in the off hand该方法用于设置将要被换至副手中的物品堆。@param offHandItem 将要被换至副手中的物品堆。
方法声明: public boolean isCancelled()
方法签名: ()Z
方法声明: public void setCancelled(boolean cancel)
方法签名: (Z)V
方法声明: public HandlerList getHandlers()
方法签名: ()Lorg/bukkit/event/HandlerList;
方法声明: public static HandlerList getHandlerList()
方法签名: ()Lorg/bukkit/event/HandlerList;