Cancellablepublic class TargetHitEvent extends ProjectileHitEvent implements Cancellable
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.
Event.Resultentity| Constructor | Description |
|---|---|
TargetHitEvent(Projectile projectile,
Block block,
BlockFace blockFace,
int signalStrength) |
| Modifier and Type | Method | Description |
|---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
int |
getSignalStrength() |
Gets the strength of the redstone signal to be emitted by the Target block
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled) |
Sets the cancellation state of this event.
|
void |
setSignalStrength(int signalStrength) |
Sets the strength of the redstone signal to be emitted by the Target block
|
getEntityTypecallEvent, getEventName, isAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEntity, getHitBlock, getHitBlockFace, getHitEntitypublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers in class ProjectileHitEvent@NotNull public static HandlerList getHandlerList()
public int getSignalStrength()
public void setSignalStrength(int signalStrength)
signalStrength - the strength of the redstone signal to be emittedCopyright © 2021. All rights reserved.