mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-14 06:36:33 +01:00
45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
From cf716be25a5b5aeea97c416dcc32c03d4572b7d2 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
|
|
index 00000000..80899ecb
|
|
--- /dev/null
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java
|
|
@@ -0,0 +1,29 @@
|
|
+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;
|
|
+
|
|
+/**
|
|
+ * Fired any time an entity attempts to teleport in an end gateway
|
|
+ */
|
|
+public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
|
|
+
|
|
+ private final EndGateway gateway;
|
|
+
|
|
+ public EntityTeleportEndGatewayEvent(Entity what, Location from, Location to, EndGateway gateway) {
|
|
+ super(what, from, to);
|
|
+ this.gateway = gateway;
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * The gateway triggering the teleport
|
|
+ *
|
|
+ * @return EndGateway used
|
|
+ */
|
|
+ public EndGateway getGateway() {
|
|
+ return gateway;
|
|
+ }
|
|
+
|
|
+}
|
|
--
|
|
2.18.0
|
|
|