aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0354-Add-EntityPortalReadyEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0354-Add-EntityPortalReadyEvent.patch')
-rw-r--r--patches/api/0354-Add-EntityPortalReadyEvent.patch21
1 files changed, 11 insertions, 10 deletions
diff --git a/patches/api/0354-Add-EntityPortalReadyEvent.patch b/patches/api/0354-Add-EntityPortalReadyEvent.patch
index b9321a8e0d..042c707eb3 100644
--- a/patches/api/0354-Add-EntityPortalReadyEvent.patch
+++ b/patches/api/0354-Add-EntityPortalReadyEvent.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent
diff --git a/src/main/java/io/papermc/paper/event/entity/EntityPortalReadyEvent.java b/src/main/java/io/papermc/paper/event/entity/EntityPortalReadyEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..3450735c86a8af45491c010a796262ae892f14dc
+index 0000000000000000000000000000000000000000..bc5f0ed43f5d341ec551e48eecf2614cdfd52d79
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/entity/EntityPortalReadyEvent.java
-@@ -0,0 +1,94 @@
+@@ -0,0 +1,95 @@
+package io.papermc.paper.event.entity;
+
+import org.bukkit.PortalType;
@@ -21,28 +21,29 @@ index 0000000000000000000000000000000000000000..3450735c86a8af45491c010a796262ae
+import org.bukkit.event.entity.EntityPortalEvent;
+import org.bukkit.event.player.PlayerPortalEvent;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
-+import org.jetbrains.annotations.Nullable;
++import org.jspecify.annotations.NullMarked;
++import org.jspecify.annotations.Nullable;
+
+/**
+ * Called when an entity is ready to be teleported by a plugin.
-+ * Currently this is only called after the required
++ * Currently, this is only called after the required
+ * ticks have passed for a Nether Portal.
+ * <p>
+ * Cancelling this event resets the entity's readiness
+ * regarding the current portal.
+ */
++@NullMarked
+public class EntityPortalReadyEvent extends EntityEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private final PortalType portalType;
-+ private World targetWorld;
++ private @Nullable World targetWorld;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public EntityPortalReadyEvent(final @NotNull Entity entity, final @Nullable World targetWorld, final @NotNull PortalType portalType) {
++ public EntityPortalReadyEvent(final Entity entity, final @Nullable World targetWorld, final PortalType portalType) {
+ super(entity);
+ this.targetWorld = targetWorld;
+ this.portalType = portalType;
@@ -81,7 +82,7 @@ index 0000000000000000000000000000000000000000..3450735c86a8af45491c010a796262ae
+ *
+ * @return the portal type
+ */
-+ public @NotNull PortalType getPortalType() {
++ public PortalType getPortalType() {
+ return this.portalType;
+ }
+
@@ -96,11 +97,11 @@ index 0000000000000000000000000000000000000000..3450735c86a8af45491c010a796262ae
+ }
+
+ @Override
-+ public @NotNull HandlerList getHandlers() {
++ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ public static @NotNull HandlerList getHandlerList() {
++ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }
+}