2018-06-09 15:21:40 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
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-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
2018-06-09 15:21:40 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java
|
|
|
|
@@ -0,0 +0,0 @@
|
|
|
|
+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;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|