Interface InteractBlockEvent
-
- All Superinterfaces:
Event
,InteractEvent
- All Known Subinterfaces:
InteractBlockEvent.Primary
,InteractBlockEvent.Primary.Finish
,InteractBlockEvent.Primary.Start
,InteractBlockEvent.Primary.Stop
,InteractBlockEvent.Secondary
public interface InteractBlockEvent extends InteractEvent
Base event for all interactions involving aBlockSnapshot
at aServerLocation
.Note: Any interaction that occurs within
BlockTypes.AIR
where theServerLocation
is not known, will contain aBlockSnapshot.empty()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
InteractBlockEvent.Primary
An event where the targeted block is being interacted with the client's "primary" button.static interface
InteractBlockEvent.Secondary
An event where the targeted block is being interacted with the client's "secondary" button.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockSnapshot
block()
Gets theBlockSnapshot
.Direction
targetSide()
Gets the target "side" of theBlockState
being interacted with orDirection.NONE
if not known.
-
-
-
Method Detail
-
block
BlockSnapshot block()
Gets theBlockSnapshot
.- Returns:
- The block snapshot
-
targetSide
Direction targetSide()
Gets the target "side" of theBlockState
being interacted with orDirection.NONE
if not known.- Returns:
- An optional containing the side being interacted with or
Direction.NONE
-
-