2020-04-02 23:07:06 +02:00
|
|
|
From dbf6e3d0d411003e38f9fd4f9ccf156d9aa05a5b Mon Sep 17 00:00:00 2001
|
2018-06-09 15:21:40 +02:00
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
Date: Sat, 9 Jun 2018 13:08:21 +0100
|
|
|
|
Subject: [PATCH] Add EntityTeleportEndGatewayEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java
|
|
|
|
new file mode 100644
|
2020-04-02 23:07:06 +02:00
|
|
|
index 000000000..bfc69a43c
|
2018-06-09 15:21:40 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java
|
2019-03-20 01:28:15 +01:00
|
|
|
@@ -0,0 +1,31 @@
|
2018-06-09 15:21:40 +02:00
|
|
|
+package com.destroystokyo.paper.event.entity;
|
|
|
|
+
|
|
|
|
+import org.bukkit.Location;
|
|
|
|
+import org.bukkit.block.EndGateway;
|
|
|
|
+import org.bukkit.entity.Entity;
|
|
|
|
+import org.bukkit.event.entity.EntityTeleportEvent;
|
2019-03-20 01:28:15 +01:00
|
|
|
+import org.jetbrains.annotations.NotNull;
|
2018-06-09 15:21:40 +02:00
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Fired any time an entity attempts to teleport in an end gateway
|
|
|
|
+ */
|
|
|
|
+public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
|
|
|
|
+
|
2019-03-20 01:28:15 +01:00
|
|
|
+ @NotNull private final EndGateway gateway;
|
2018-06-09 15:21:40 +02:00
|
|
|
+
|
2019-03-20 01:28:15 +01:00
|
|
|
+ public EntityTeleportEndGatewayEvent(@NotNull Entity what, @NotNull Location from, @NotNull Location to, @NotNull EndGateway gateway) {
|
2018-06-09 15:21:40 +02:00
|
|
|
+ super(what, from, to);
|
|
|
|
+ this.gateway = gateway;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The gateway triggering the teleport
|
|
|
|
+ *
|
|
|
|
+ * @return EndGateway used
|
|
|
|
+ */
|
2019-03-20 01:28:15 +01:00
|
|
|
+ @NotNull
|
2018-06-09 15:21:40 +02:00
|
|
|
+ public EndGateway getGateway() {
|
|
|
|
+ return gateway;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
--
|
2020-04-02 23:07:06 +02:00
|
|
|
2.25.1
|
2018-06-09 15:21:40 +02:00
|
|
|
|