2019-05-27 11:13:41 +02:00
|
|
|
From 9c461d8d344b0176143af283f8385f567bcc3c2d 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
|
2019-04-23 06:47:07 +02:00
|
|
|
index 00000000..bfc69a43
|
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;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
--
|
2019-03-20 01:28:15 +01:00
|
|
|
2.21.0
|
2018-06-09 15:21:40 +02:00
|
|
|
|