Class TargetHitEvent

All Implemented Interfaces:
Cancellable

public class TargetHitEvent extends ProjectileHitEvent
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.

  • Constructor Details

  • Method Details

    • getSignalStrength

      public @org.jetbrains.annotations.Range(from=0L, to=15L) int getSignalStrength()
      Gets the strength of the redstone signal to be emitted by the Target block
      Returns:
      the strength of the redstone signal to be emitted
    • setSignalStrength

      public void setSignalStrength(@org.jetbrains.annotations.Range(from=0L, to=15L) int signalStrength)
      Sets the strength of the redstone signal to be emitted by the Target block
      Parameters:
      signalStrength - the strength of the redstone signal to be emitted
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Overrides:
      getHandlers in class ProjectileHitEvent
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()