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 Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
Constructors -
Method Summary
Modifier 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.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerNaturallySpawnCreaturesEvent
-
-
Method Details
-
getSpawnRadius
public byte getSpawnRadius()- Returns:
- The radius of chunks around this player to be included in natural spawn selection
-
setSpawnRadius
public void setSpawnRadius(byte radius) - Parameters:
radius- The radius of chunks around this player to be included in natural spawn selection
-
isCancelled
public 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 interfaceCancellable- Returns:
- If this player's chunks will be excluded from natural spawns
-
setCancelled
public 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 interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event, and not include this player's chunks for natural spawning
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-