aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch')
-rw-r--r--patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch19
1 files changed, 9 insertions, 10 deletions
diff --git a/patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch b/patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch
index 817c6f25e1..4cf38c237e 100644
--- a/patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch
+++ b/patches/api/0080-PlayerNaturallySpawnCreaturesEvent.patch
@@ -10,10 +10,10 @@ Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PlayerNaturallySpawnCreaturesEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PlayerNaturallySpawnCreaturesEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..7fcee73d61347165cefef7b92f0e63e0bed8ad73
+index 0000000000000000000000000000000000000000..a3267a283b39e8db1e9b7e5338d2909320f1421c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PlayerNaturallySpawnCreaturesEvent.java
-@@ -0,0 +1,66 @@
+@@ -0,0 +1,65 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.Player;
@@ -21,11 +21,12 @@ index 0000000000000000000000000000000000000000..7fcee73d61347165cefef7b92f0e63e0
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
+/**
+ * Fired when the server is calculating what chunks to try to spawn monsters in every Monster Spawn Tick event
+ */
++@NullMarked
+public class PlayerNaturallySpawnCreaturesEvent extends PlayerEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -34,7 +35,7 @@ index 0000000000000000000000000000000000000000..7fcee73d61347165cefef7b92f0e63e0
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public PlayerNaturallySpawnCreaturesEvent(@NotNull Player player, byte radius) {
++ public PlayerNaturallySpawnCreaturesEvent(final Player player, final byte radius) {
+ super(player);
+ this.radius = radius;
+ }
@@ -49,12 +50,12 @@ index 0000000000000000000000000000000000000000..7fcee73d61347165cefef7b92f0e63e0
+ /**
+ * @param radius The radius of chunks around this player to be included in natural spawn selection
+ */
-+ public void setSpawnRadius(byte radius) {
++ public void setSpawnRadius(final byte radius) {
+ this.radius = radius;
+ }
+
+ /**
-+ * @return If this players chunks will be excluded from natural spawns
++ * @return If this player's chunks will be excluded from natural spawns
+ */
+ @Override
+ public boolean isCancelled() {
@@ -62,20 +63,18 @@ index 0000000000000000000000000000000000000000..7fcee73d61347165cefef7b92f0e63e0
+ }
+
+ /**
-+ * @param cancel {@code true} if you wish to cancel this event, and not include this players chunks for natural spawning
++ * @param cancel {@code true} if you wish to cancel this event, and not include this player's chunks for natural spawning
+ */
+ @Override
-+ public void setCancelled(boolean cancel) {
++ public void setCancelled(final boolean cancel) {
+ this.cancelled = cancel;
+ }
+
-+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }