make EntityPortalReadyEvent#setTargetWorld work again

This commit is contained in:
Jake Potrebic 2024-06-16 15:48:38 -07:00
parent fb762cf368
commit a7f6633362
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
17 changed files with 47 additions and 52 deletions

View file

@ -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..a3242498c1c44cee3eec708cbca5b776ceb84c3e
index 0000000000000000000000000000000000000000..3450735c86a8af45491c010a796262ae892f14dc
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/entity/EntityPortalReadyEvent.java
@@ -0,0 +1,96 @@
@@ -0,0 +1,94 @@
+package io.papermc.paper.event.entity;
+
+import org.bukkit.PortalType;
@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..a3242498c1c44cee3eec708cbca5b776
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private final PortalType portalType;
+ private final World targetWorld;
+ private World targetWorld;
+
+ private boolean cancelled;
+
@ -71,11 +71,9 @@ index 0000000000000000000000000000000000000000..a3242498c1c44cee3eec708cbca5b776
+ * or {@link EntityPortalEvent}.
+ *
+ * @param targetWorld the world
+ * @deprecated changing the target world has no effect
+ */
+ @Deprecated(forRemoval = true, since = "1.21")
+ public void setTargetWorld(final @Nullable World targetWorld) {
+ // this.targetWorld = targetWorld;
+ this.targetWorld = targetWorld;
+ }
+
+ /**