Package org.bukkit.event.world

# Class GenericGameEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.world.WorldEvent
org.bukkit.event.world.GenericGameEvent

All Implemented Interfaces:
  `Cancellable`

public class GenericGameEvent extends WorldEvent implements Cancellable
Represents a generic Mojang game event. Specific Bukkit events should be used where possible, this event is mainly used internally by Sculk sensors.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Constructor Summary

Constructors
Constructor
Description
`GenericGameEvent(@NotNull GameEvent event, @NotNull Location location, @Nullable Entity entity, int radius, boolean isAsync)`

## Method Summary

Modifier and Type
Method
Description
`@Nullable Entity`
`getEntity()`
Get the entity which triggered this event, if present.
`@NotNull GameEvent`
`getEvent()`
Get the underlying event.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@NotNull 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.

### Methods inherited from class org.bukkit.event.world.WorldEvent

`getWorld`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### GenericGameEvent

public GenericGameEvent(@NotNull @NotNull GameEvent event, @NotNull @NotNull Location location, @Nullable @Nullable Entity entity, int radius, boolean isAsync)

## Method Details

### getEvent

@NotNull public @NotNull GameEvent getEvent()
Get the underlying event.

Returns:
  the event

### getLocation

@NotNull public @NotNull Location getLocation()
Get the location where the event occurred.

Returns:
  event location

### getEntity

@Nullable public @Nullable Entity getEntity()
Get the entity which triggered this event, if present.

Returns:
  triggering entity or null

### getRadius

public int getRadius()
Get the block radius to which this event will be broadcast.

Returns:
  broadcast radius

### setRadius

public void setRadius(int radius)
Set the radius to which the event should be broadcast.

Parameters:
  `radius` - radius, must be greater than or equal to 0

### setCancelled

public void setCancelled(boolean cancel)
Description copied from interface: `Cancellable`
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Specified by:
  `setCancelled` in interface `Cancellable`
Parameters:
  `cancel` - true if you wish to cancel this event

### isCancelled

public boolean isCancelled()
Description copied from interface: `Cancellable`
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Specified by:
  `isCancelled` in interface `Cancellable`
Returns:
  true if this event is cancelled

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()