2019-05-27 09:13:41 +00:00
|
|
|
From 9c461d8d344b0176143af283f8385f567bcc3c2d Mon Sep 17 00:00:00 2001
|
2018-06-09 13:21:40 +00: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
|
2019-04-23 04:47:07 +00:00
|
|
|
index 00000000..bfc69a43
|
2018-06-09 13:21:40 +00:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java
|
2019-03-20 00:28:15 +00:00
|
|
|
@@ -0,0 +1,31 @@
|
2018-06-09 13:21:40 +00: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 00:28:15 +00:00
|
|
|
+import org.jetbrains.annotations.NotNull;
|
2018-06-09 13:21:40 +00:00
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Fired any time an entity attempts to teleport in an end gateway
|
|
|
|
+ */
|
|
|
|
+public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
|
|
|
|
+
|
2019-03-20 00:28:15 +00:00
|
|
|
+ @NotNull private final EndGateway gateway;
|
2018-06-09 13:21:40 +00:00
|
|
|
+
|
2019-03-20 00:28:15 +00:00
|
|
|
+ public EntityTeleportEndGatewayEvent(@NotNull Entity what, @NotNull Location from, @NotNull Location to, @NotNull EndGateway gateway) {
|
2018-06-09 13:21:40 +00:00
|
|
|
+ super(what, from, to);
|
|
|
|
+ this.gateway = gateway;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The gateway triggering the teleport
|
|
|
|
+ *
|
|
|
|
+ * @return EndGateway used
|
|
|
|
+ */
|
2019-03-20 00:28:15 +00:00
|
|
|
+ @NotNull
|
2018-06-09 13:21:40 +00:00
|
|
|
+ public EndGateway getGateway() {
|
|
|
|
+ return gateway;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
--
|
2019-03-20 00:28:15 +00:00
|
|
|
2.21.0
|
2018-06-09 13:21:40 +00:00
|
|
|
|