Class TargetHitEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.ProjectileHitEvent
io.papermc.paper.event.block.TargetHitEvent
- All Implemented Interfaces:
Cancellable
Called when a Target Block is hit by a projectile.
Cancelling this event will stop the Target from emitting a redstone signal, and in the case that the shooter is a player, will stop them from receiving advancement criteria.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class EntityEvent
entity -
Constructor Summary
ConstructorsConstructorDescriptionTargetHitEvent(Projectile projectile, Block block, BlockFace blockFace, int signalStrength) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListGets the strength of the redstone signal to be emitted by the Target blockvoidsetSignalStrength(@Range(from=0L,to=15L) int signalStrength) Sets the strength of the redstone signal to be emitted by the Target blockMethods inherited from class ProjectileHitEvent
getEntity, getHitBlock, getHitBlockFace, getHitEntity, isCancelled, setCancelledMethods inherited from class EntityEvent
getEntityTypeMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
TargetHitEvent
@Internal public TargetHitEvent(Projectile projectile, Block block, BlockFace blockFace, int signalStrength)
-
-
Method Details
-
getSignalStrength
-
setSignalStrength
-
getHandlers
- Overrides:
getHandlersin classProjectileHitEvent
-
getHandlerList
-