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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn event where the targeted block is being interacted with the client's "primary" button.static interfaceAn 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 theBlockStatebeing interacted with orDirection.NONEif not known.
-
Method Details
-
block
BlockSnapshot block()Gets theBlockSnapshot.- Returns:
- The block snapshot
-
targetSide
Direction targetSide()Gets the target "side" of theBlockStatebeing interacted with orDirection.NONEif not known.- Returns:
- An optional containing the side being interacted with or
Direction.NONE
-