mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads 3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495 e470f1ef Add more information to Timing Reports f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers a4fe910f Fix sounds when using worldedit regen command 70ad51a8 Updated Upstream (Bukkit/CraftBukkit) d7cfa4fa Improve legacy format serialization more
60 lines
1.7 KiB
Diff
60 lines
1.7 KiB
Diff
From e63bb83fe25662c23e93b21da43c4f75ec616990 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sat, 11 Jan 2020 23:12:00 -0600
|
|
Subject: [PATCH] Add EntityPortalReadyEvent
|
|
|
|
---
|
|
.../event/entity/EntityPortalReadyEvent.java | 40 +++++++++++++++++++
|
|
1 file changed, 40 insertions(+)
|
|
create mode 100644 src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java b/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java
|
|
new file mode 100644
|
|
index 000000000..37f11c104
|
|
--- /dev/null
|
|
+++ b/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java
|
|
@@ -0,0 +1,40 @@
|
|
+package net.pl3x.purpur.event.entity;
|
|
+
|
|
+import org.bukkit.entity.Entity;
|
|
+import org.bukkit.event.Cancellable;
|
|
+import org.bukkit.event.HandlerList;
|
|
+import org.bukkit.event.entity.EntityEvent;
|
|
+import org.jetbrains.annotations.NotNull;
|
|
+
|
|
+/**
|
|
+ * Called when an entity is ready to travel through a portal
|
|
+ */
|
|
+public class EntityPortalReadyEvent extends EntityEvent implements Cancellable {
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
+ private boolean cancelled = false;
|
|
+
|
|
+ public EntityPortalReadyEvent(@NotNull Entity entity) {
|
|
+ super(entity);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isCancelled() {
|
|
+ return cancelled;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setCancelled(boolean cancel) {
|
|
+ this.cancelled = cancel;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ @Override
|
|
+ public HandlerList getHandlers() {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ public static HandlerList getHandlerList() {
|
|
+ return handlers;
|
|
+ }
|
|
+}
|
|
--
|
|
2.24.0
|
|
|