Package com.destroystokyo.paper.event.entity

# Class PhantomPreSpawnEvent

java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent
com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent

All Implemented Interfaces:
  `Cancellable`

public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent
Called when a phantom is spawned for an exhausted player

## Nested Class Summary

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

`Event.Result`

## Constructor Summary

Constructors
Constructor
Description
`PhantomPreSpawnEvent(@NotNull Location location, @NotNull Entity entity, CreatureSpawnEvent.SpawnReason reason)`

## Method Summary

Modifier and Type
Method
Description
`@Nullable Entity`
`getSpawningEntity()`
Get the entity this phantom is spawning for

### Methods inherited from class com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent

`getHandlerList, getHandlers, getReason, getSpawnLocation, getType, isCancelled, setCancelled, setShouldAbortSpawn, shouldAbortSpawn`

### 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

### PhantomPreSpawnEvent

public PhantomPreSpawnEvent(@NotNull @NotNull Location location, @NotNull @NotNull Entity entity, @NotNull CreatureSpawnEvent.SpawnReason reason)

## Method Details

### getSpawningEntity

@Nullable public @Nullable Entity getSpawningEntity()
Get the entity this phantom is spawning for

Returns:
  Entity