net.minecraftforge.event.entity.player

## Class PlayerInteractEvent

- java.lang.Object
- - cpw.mods.fml.common.eventhandler.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.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking`

    - ### 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, EntityEvent.EntityConstructing`

    - ### Nested classes/interfaces inherited from class cpw.mods.fml.common.eventhandler.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`
    `World` | `world`
    `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)` Deprecated.
    `PlayerInteractEvent(EntityPlayer player, PlayerInteractEvent.Action action, int x, int y, int z, int face, World world)`

  - ### 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 cpw.mods.fml.common.eventhandler.Event

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

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

      `clone, equals, finalize, 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

    - #### world

          public final World world

    - #### useBlock

          public Event.Result useBlock

    - #### useItem

          public Event.Result useItem

  - ### Constructor Detail

    - #### PlayerInteractEvent

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

      Deprecated.

    - #### PlayerInteractEvent

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

  - ### 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