public class GenericGameEvent extends WorldEvent implements Cancellable
Event.Result
Constructor and Description |
---|
GenericGameEvent(GameEvent event,
Location location,
Entity entity,
int radius) |
Modifier and Type | Method and Description |
---|---|
Entity |
getEntity()
Get the entity which triggered this event, if present.
|
GameEvent |
getEvent()
Get the underlying event.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
Location |
getLocation()
Get the location where the event occurred.
|
int |
getRadius()
Get the block radius to which this event will be broadcast.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setRadius(int radius)
Set the radius to which the event should be broadcast.
|
getWorld
getEventName, isAsynchronous
@NotNull public GameEvent getEvent()
@NotNull public Location getLocation()
@Nullable public Entity getEntity()
public int getRadius()
public void setRadius(int radius)
radius
- radius, must be greater than or equal to 0public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.