PlayerInteractEvent

public class PlayerInteractEvent extends PlayerEvent

Event fired when playerinteract occurs. Listen for this event using EventBus.register.

java.lang.Object > PlayerEvent > PlayerInteractEvent

Field Summary

cancelled

private boolean cancelled

Field cancelled.

Method Detail

PlayerInteractEvent

public public PlayerInteractEvent (@Nonnull final Ref ref, @Nonnull final Player player, final long clientUseTime, final InteractionType actionType, final ItemStack itemInHand, final Vector3i targetBlock, final Ref targetRef, final Entity targetEntity)

Method PlayerInteractEvent.

Parameters:
@Nonnull final Ref ref
@Nonnull final Player player
final long clientUseTime
final InteractionType actionType
final ItemStack itemInHand
final Vector3i targetBlock
final Ref targetRef
final Entity targetEntity

isCancelled

public boolean isCancelled ()

Method isCancelled.

setCancelled

public void setCancelled (final boolean cancelled)

Method setCancelled.

Parameters:
final boolean cancelled

getActionType

public InteractionType getActionType ()

Method getActionType.

getClientUseTime

public long getClientUseTime ()

Method getClientUseTime.

getItemInHand

public ItemStack getItemInHand ()

Method getItemInHand.

getTargetBlock

public Vector3i getTargetBlock ()

Method getTargetBlock.

getTargetEntity

public Entity getTargetEntity ()

Method getTargetEntity.

getTargetRef

public Ref getTargetRef ()

Method getTargetRef.

toString

public String toString ()

Method toString.