mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Merge in Tuinity patches
This commit is contained in:
59
patches/api/0009-Add-EntityPortalReadyEvent.patch
Normal file
59
patches/api/0009-Add-EntityPortalReadyEvent.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From fb1b62df2e5107f2a3f0a8d3a99a48a6c711ed62 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
|
||||
|
||||
Reference in New Issue
Block a user