Class PlayerInteractEvent.RightClickItem

Enclosing class:
PlayerInteractEvent

public static class PlayerInteractEvent.RightClickItem extends PlayerInteractEvent
This event is fired on both sides before the player triggers Item.use(Level, Player, InteractionHand). 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 Item.use(Level, Player, InteractionHand), or PlayerInteractEvent.cancellationResult if the event is cancelled. If we are on the client and result is not InteractionResult.SUCCESS, the client will then continue to other hands.