Interface InteractBlockEvent
- All Superinterfaces:
Event
,InteractEvent
- All Known Subinterfaces:
InteractBlockEvent.Primary
,InteractBlockEvent.Primary.Finish
,InteractBlockEvent.Primary.Start
,InteractBlockEvent.Primary.Stop
,InteractBlockEvent.Secondary
Base event for all interactions involving a
BlockSnapshot
at a
ServerLocation
.
Note: Any interaction that occurs within BlockTypes.AIR
where the
ServerLocation
is not known, will contain a BlockSnapshot.empty()
.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
An event where the targeted block is being interacted with the client's "primary" button.static interface
An event where the targeted block is being interacted with the client's "secondary" button. -
Method Summary
Modifier and TypeMethodDescriptionblock()
Gets theBlockSnapshot
.Gets the target "side" of theBlockState
being interacted with orDirection.NONE
if not known.
-
Method Details
-
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
-