UseBlockEvent

abstract class UseBlockEvent extends EcsEvent

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

java.lang.Object > EcsEvent > UseBlockEvent

Field Summary

cancelled

private boolean cancelled

Field cancelled.

Method Detail

UseBlockEvent

public public UseBlockEvent (@Nonnull final InteractionType interactionType, @Nonnull final InteractionContext context, @Nonnull final Vector3i targetBlock, @Nonnull final BlockType blockType)

Method UseBlockEvent.

Parameters:
@Nonnull final InteractionType interactionType
@Nonnull final InteractionContext context
@Nonnull final Vector3i targetBlock
@Nonnull final BlockType blockType

getInteractionType

public InteractionType getInteractionType ()

Method getInteractionType.

getContext

public InteractionContext getContext ()

Method getContext.

getTargetBlock

public Vector3i getTargetBlock ()

Method getTargetBlock.

getBlockType

public BlockType getBlockType ()

Method getBlockType.

Pre

public public Pre (@Nonnull final InteractionType interactionType, @Nonnull final InteractionContext context, @Nonnull final Vector3i targetBlock, @Nonnull final BlockType blockType)

Method Pre.

Parameters:
@Nonnull final InteractionType interactionType
@Nonnull final InteractionContext context
@Nonnull final Vector3i targetBlock
@Nonnull final BlockType blockType

isCancelled

public boolean isCancelled ()

Method isCancelled.

setCancelled

public void setCancelled (final boolean cancelled)

Method setCancelled.

Parameters:
final boolean cancelled

Post

public public Post (@Nonnull final InteractionType interactionType, @Nonnull final InteractionContext context, @Nonnull final Vector3i targetBlock, @Nonnull final BlockType blockType)

Method Post.

Parameters:
@Nonnull final InteractionType interactionType
@Nonnull final InteractionContext context
@Nonnull final Vector3i targetBlock
@Nonnull final BlockType blockType