Class PlayerInteractEvent.RightClickItem

Enclosing class:

public static class PlayerInteractEvent.RightClickItem extends PlayerInteractEvent
This event is fired on both sides before the player triggers net.minecraft.item.Item#onItemRightClick. Note that this is NOT fired if the player is targeting a block PlayerInteractEvent.RightClickBlock or entity PlayerInteractEvent.EntityInteract PlayerInteractEvent.EntityInteractSpecific. Let result be the return value of net.minecraft.item.Item#onItemRightClick, or PlayerInteractEvent.cancellationResult if the event is cancelled. If we are on the client and result is not EnumActionResult#SUCCESS, the client will then continue to other hands.
  • Constructor Details