public class BlockInteractEvent extends Event implements Cancellable
Constructor and Description |
---|
BlockInteractEvent(Actor cause,
Location location,
Interaction type)
Create a new event.
|
Modifier and Type | Method and Description |
---|---|
Actor |
getCause()
Get the cause of this event.
|
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.
|
public BlockInteractEvent(Actor cause, Location location, Interaction type)
cause
- the causing actorlocation
- the location of the blocktype
- the type of interactionpublic Actor getCause()
public Location getLocation()
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