aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0242-add-DragonEggFormEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0242-add-DragonEggFormEvent.patch')
-rw-r--r--patches/api/0242-add-DragonEggFormEvent.patch12
1 files changed, 5 insertions, 7 deletions
diff --git a/patches/api/0242-add-DragonEggFormEvent.patch b/patches/api/0242-add-DragonEggFormEvent.patch
index 3b40a9f99d..42db98133a 100644
--- a/patches/api/0242-add-DragonEggFormEvent.patch
+++ b/patches/api/0242-add-DragonEggFormEvent.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] add DragonEggFormEvent
diff --git a/src/main/java/io/papermc/paper/event/block/DragonEggFormEvent.java b/src/main/java/io/papermc/paper/event/block/DragonEggFormEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..695c21a296c6d12e1204eba33b92c44e7c2d98b8
+index 0000000000000000000000000000000000000000..d0549d95985ff08af1fc1e6291e0124b766bf99d
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/block/DragonEggFormEvent.java
-@@ -0,0 +1,55 @@
+@@ -0,0 +1,53 @@
+package io.papermc.paper.event.block;
+
+import org.bukkit.Material;
@@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..695c21a296c6d12e1204eba33b92c44e
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.block.BlockFormEvent;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
+/**
+ * Called when the {@link EnderDragon} is defeated (killed) in a {@link DragonBattle},
@@ -30,6 +30,7 @@ index 0000000000000000000000000000000000000000..695c21a296c6d12e1204eba33b92c44e
+ * <b>This event might be cancelled by default depending on
+ * e.g. {@link DragonBattle#hasBeenPreviouslyKilled()} and server configuration.</b>
+ */
++@NullMarked
+public class DragonEggFormEvent extends BlockFormEvent {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -37,7 +38,7 @@ index 0000000000000000000000000000000000000000..695c21a296c6d12e1204eba33b92c44e
+ private final DragonBattle dragonBattle;
+
+ @ApiStatus.Internal
-+ public DragonEggFormEvent(@NotNull Block block, @NotNull BlockState newState, @NotNull DragonBattle dragonBattle) {
++ public DragonEggFormEvent(final Block block, final BlockState newState, final DragonBattle dragonBattle) {
+ super(block, newState);
+ this.dragonBattle = dragonBattle;
+ }
@@ -49,18 +50,15 @@ index 0000000000000000000000000000000000000000..695c21a296c6d12e1204eba33b92c44e
+ *
+ * @return the dragon battle
+ */
-+ @NotNull
+ public DragonBattle getDragonBattle() {
+ return this.dragonBattle;
+ }
+
-+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }