net.minecraftforge.event.entity.player

## Class PlayerInteractEvent

- java.lang.Object
- - net.minecraftforge.event.Event
  - - net.minecraftforge.event.entity.EntityEvent
    - - net.minecraftforge.event.entity.living.LivingEvent
      - - net.minecraftforge.event.entity.player.PlayerEvent
        - - net.minecraftforge.event.entity.player.PlayerInteractEvent

-     public class PlayerInteractEvent
      extends PlayerEvent

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PlayerInteractEvent.Action`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent

      `PlayerEvent.BreakSpeed, PlayerEvent.HarvestCheck`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent

      `LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent

      `EntityEvent.CanUpdate, EntityEvent.EnteringChunk`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.Event

      `Event.HasResult, Event.Result`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `PlayerInteractEvent.Action` | `action`
    `int` | `face`
    `Event.Result` | `useBlock`
    `Event.Result` | `useItem`
    `int` | `x`
    `int` | `y`
    `int` | `z`

    - ### Fields inherited from class net.minecraftforge.event.entity.player.PlayerEvent

      `entityPlayer`

    - ### Fields inherited from class net.minecraftforge.event.entity.living.LivingEvent

      `entityLiving`

    - ### Fields inherited from class net.minecraftforge.event.entity.EntityEvent

      `entity`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlayerInteractEvent(EntityPlayer player, PlayerInteractEvent.Action action, int x, int y, int z, int face)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setCanceled(boolean cancel)` Sets the state of this event, not all events are cancelable, and any attempt to cancel a event that can't be will result in a IllegalArgumentException.

    - ### Methods inherited from class net.minecraftforge.event.Event

      `getListenerList, getResult, hasResult, isCancelable, isCanceled, setResult`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### action

          public final PlayerInteractEvent.Action action

    - #### x

          public final int x

    - #### y

          public final int y

    - #### z

          public final int z

    - #### face

          public final int face

    - #### useBlock

          public Event.Result useBlock

    - #### useItem

          public Event.Result useItem

  - ### Constructor Detail

    - #### PlayerInteractEvent

          public PlayerInteractEvent(EntityPlayer player,
                             PlayerInteractEvent.Action action,
                             int x,
                             int y,
                             int z,
                             int face)

  - ### Method Detail

    - #### setCanceled

          public void setCanceled(boolean cancel)

      Description copied from class: `Event`
      Sets the state of this event, not all events are cancelable, and any attempt to cancel a event that can't be will result in a IllegalArgumentException. The functionality of setting the canceled state is defined on a per-event bases.
      Overrides:
        `setCanceled` in class `Event`
      Parameters:
        `cancel` - The new canceled value