aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0367-Add-EntityPortalReadyEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0367-Add-EntityPortalReadyEvent.patch')
-rw-r--r--patches/api/0367-Add-EntityPortalReadyEvent.patch31
1 files changed, 18 insertions, 13 deletions
diff --git a/patches/api/0367-Add-EntityPortalReadyEvent.patch b/patches/api/0367-Add-EntityPortalReadyEvent.patch
index 4b1b1f1e1f..b9321a8e0d 100644
--- a/patches/api/0367-Add-EntityPortalReadyEvent.patch
+++ b/patches/api/0367-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..3c6c1d7e97a0c9813bbc585fd209cc63f498e0d4
+index 0000000000000000000000000000000000000000..3450735c86a8af45491c010a796262ae892f14dc
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/entity/EntityPortalReadyEvent.java
-@@ -0,0 +1,89 @@
+@@ -0,0 +1,94 @@
+package io.papermc.paper.event.entity;
+
+import org.bukkit.PortalType;
@@ -18,6 +18,9 @@ index 0000000000000000000000000000000000000000..3c6c1d7e97a0c9813bbc585fd209cc63
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
++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;
+
@@ -33,10 +36,12 @@ index 0000000000000000000000000000000000000000..3c6c1d7e97a0c9813bbc585fd209cc63
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
-+ private World targetWorld;
+ private final PortalType portalType;
++ private World targetWorld;
++
+ private boolean cancelled;
+
++ @ApiStatus.Internal
+ public EntityPortalReadyEvent(final @NotNull Entity entity, final @Nullable World targetWorld, final @NotNull PortalType portalType) {
+ super(entity);
+ this.targetWorld = targetWorld;
@@ -45,25 +50,25 @@ index 0000000000000000000000000000000000000000..3c6c1d7e97a0c9813bbc585fd209cc63
+
+ /**
+ * Gets the world this portal will teleport to.
-+ * Can be null if "allow-nether" is false in server.properties
++ * Can be {@code null} if "allow-nether" is false in server.properties
+ * or if there is another situation where there is no world to teleport to.
+ * <p>
-+ * This world may be modified by later events such as {@link org.bukkit.event.player.PlayerPortalEvent}
-+ * or {@link org.bukkit.event.entity.EntityPortalEvent}.
++ * This world may be modified by later events such as {@link PlayerPortalEvent}
++ * or {@link EntityPortalEvent}.
+ *
+ * @return the world the portal will teleport the entity to.
+ */
+ public @Nullable World getTargetWorld() {
-+ return targetWorld;
++ return this.targetWorld;
+ }
+
+ /**
-+ * Sets the world this portal will teleport to. A null value
++ * Sets the world this portal will teleport to. A {@code null} value
+ * will essentially cancel the teleport and prevent further events
-+ * such as {@link org.bukkit.event.player.PlayerPortalEvent} from firing.
++ * such as {@link PlayerPortalEvent} from firing.
+ * <p>
-+ * This world may be modified by later events such as {@link org.bukkit.event.player.PlayerPortalEvent}
-+ * or {@link org.bukkit.event.entity.EntityPortalEvent}.
++ * This world may be modified by later events such as {@link PlayerPortalEvent}
++ * or {@link EntityPortalEvent}.
+ *
+ * @param targetWorld the world
+ */
@@ -77,12 +82,12 @@ index 0000000000000000000000000000000000000000..3c6c1d7e97a0c9813bbc585fd209cc63
+ * @return the portal type
+ */
+ public @NotNull PortalType getPortalType() {
-+ return portalType;
++ return this.portalType;
+ }
+
+ @Override
+ public boolean isCancelled() {
-+ return cancelled;
++ return this.cancelled;
+ }
+
+ @Override