Cancellable
public class BeaconEffectEvent extends BlockEvent implements Cancellable
Event.Result
block
Constructor | Description |
---|---|
BeaconEffectEvent(@NotNull Block block,
@NotNull PotionEffect effect,
@NotNull Player player,
boolean primary) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull PotionEffect |
getEffect() |
Gets the potion effect being applied.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull Player |
getPlayer() |
Gets the player who the potion effect is being applied to.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
boolean |
isPrimary() |
Gets whether the effect is a primary beacon effect.
|
void |
setCancelled(boolean cancelled) |
Sets the cancellation state of this event.
|
void |
setEffect(@NotNull PotionEffect effect) |
Sets the potion effect that will be applied.
|
getBlock
callEvent, getEventName, isAsynchronous
public BeaconEffectEvent(@NotNull @NotNull Block block, @NotNull @NotNull PotionEffect effect, @NotNull @NotNull Player player, boolean primary)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if you wish to cancel this event@NotNull public @NotNull PotionEffect getEffect()
public void setEffect(@NotNull @NotNull PotionEffect effect)
effect
- Potion effect@NotNull public @NotNull Player getPlayer()
public boolean isPrimary()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.