Interface CollideBlockEvent
-
- All Superinterfaces:
Cancellable,CollideEvent,Event
- All Known Subinterfaces:
CollideBlockEvent.Fall,CollideBlockEvent.Impact,CollideBlockEvent.Inside,CollideBlockEvent.Move,CollideBlockEvent.StepOn
public interface CollideBlockEvent extends CollideEvent
Fired when anEntitycollides with aBlockSnapshot.Note that this event is fired very often. You might want to listen to one of its sub-events instead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCollideBlockEvent.FallFires when anEntityfalls on a block.static interfaceCollideBlockEvent.ImpactFired when anEntityimpacts anotherBlockSnapshot.static interfaceCollideBlockEvent.InsideFires when anEntityis inside a block.static interfaceCollideBlockEvent.MoveFires when anEntitymoves into a block and collides with it.static interfaceCollideBlockEvent.StepOnFires when anEntitysteps on a block.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockStatetargetBlock()Gets the targetBlockStatebeing interacted with.ServerLocationtargetLocation()Gets the targetServerLocationbeing interacted with.DirectiontargetSide()Gets the target "side" of theBlockStatebeing interacted with orDirection.NONEif not known.-
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
-
-
-
-
Method Detail
-
targetLocation
ServerLocation targetLocation()
Gets the targetServerLocationbeing interacted with.- Returns:
- The location
-
targetBlock
BlockState targetBlock()
Gets the targetBlockStatebeing interacted with.- Returns:
- The block state
-
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
-
-