public class BlockInteractEvent extends Event implements Cancellable
Constructor and Description |
---|
BlockInteractEvent(Actor cause,
Location location,
Direction face,
Interaction type)
Create a new event.
|
BlockInteractEvent(Actor cause,
Location location,
Interaction type)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Actor |
getCause()
Get the cause of this event.
|
Direction |
getFace()
Get the face of the block that was interacted with.
|
Location |
getLocation()
Get the location of the block that was interacted with.
|
Interaction |
getType()
Get the type of interaction.
|
boolean |
isCancelled()
Returns whether the event has been cancelled.
|
void |
setCancelled(boolean cancelled)
Set whether the event has been cancelled.
|
@Deprecated public BlockInteractEvent(Actor cause, Location location, Interaction type)
cause
- the causing actorlocation
- the location of the blocktype
- the type of interactionpublic BlockInteractEvent(Actor cause, Location location, @Nullable Direction face, Interaction type)
cause
- the causing actorlocation
- the location of the blockface
- the face of the block that was interacted withtype
- the type of interactionpublic Actor getCause()
public Location getLocation()
@Nullable public Direction getFace()
public Interaction getType()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if cancelled