2021-06-11 14:02:28 +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
|
2024-09-29 21:52:13 +02:00
|
|
|
index 0000000000000000000000000000000000000000..cea029bfbd526d21509dee69bbfad44323107cf2
|
2021-06-11 14:02:28 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTeleportEndGatewayEvent.java
|
2024-02-01 10:15:57 +01:00
|
|
|
@@ -0,0 +1,33 @@
|
2021-06-11 14:02:28 +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;
|
2024-02-01 10:15:57 +01:00
|
|
|
+import org.jetbrains.annotations.ApiStatus;
|
2024-09-29 21:52:13 +02:00
|
|
|
+import org.jspecify.annotations.NullMarked;
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Fired any time an entity attempts to teleport in an end gateway
|
|
|
|
+ */
|
2024-09-29 21:52:13 +02:00
|
|
|
+@NullMarked
|
2021-06-11 14:02:28 +02:00
|
|
|
+public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
|
|
|
|
+
|
2024-09-29 21:52:13 +02:00
|
|
|
+ private final EndGateway gateway;
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
2024-02-01 10:15:57 +01:00
|
|
|
+ @ApiStatus.Internal
|
2024-09-29 21:52:13 +02:00
|
|
|
+ public EntityTeleportEndGatewayEvent(final Entity entity, final Location from, final Location to, final EndGateway gateway) {
|
2024-02-01 10:15:57 +01:00
|
|
|
+ super(entity, from, to);
|
2021-06-11 14:02:28 +02:00
|
|
|
+ this.gateway = gateway;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The gateway triggering the teleport
|
|
|
|
+ *
|
|
|
|
+ * @return EndGateway used
|
|
|
|
+ */
|
|
|
|
+ public EndGateway getGateway() {
|
2024-02-01 10:15:57 +01:00
|
|
|
+ return this.gateway;
|
2021-06-11 14:02:28 +02:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|