Class PlayerNaturallySpawnCreaturesEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent
- All Implemented Interfaces:
- Cancellable
@NullMarked
public class PlayerNaturallySpawnCreaturesEvent
extends PlayerEvent
implements Cancellable
Fired when the server is calculating what chunks to try to spawn monsters in every Monster Spawn Tick event
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic HandlerListbytebooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetSpawnRadius(byte radius) Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerNaturallySpawnCreaturesEvent
 
- 
- 
Method Details- 
getSpawnRadiuspublic byte getSpawnRadius()- Returns:
- The radius of chunks around this player to be included in natural spawn selection
 
- 
setSpawnRadiuspublic void setSpawnRadius(byte radius) - Parameters:
- radius- The radius of chunks around this player to be included in natural spawn selection
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets 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:
- isCancelledin interface- Cancellable
- Returns:
- If this player's chunks will be excluded from natural spawns
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets 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:
- setCancelledin interface- Cancellable
- Parameters:
- cancel-- trueif you wish to cancel this event, and not include this player's chunks for natural spawning
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-