1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-16 18:31:53 +01:00

Add EntityTeleportEndGatewayEvent

This commit is contained in:
Shane Freeder 2018-06-09 13:08:21 +01:00
parent b513a8369d
commit 5cc8f5a0e6

View file

@ -0,0 +1,33 @@
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;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity attempts to teleport in an end gateway
*/
@NullMarked
public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
private final EndGateway gateway;
@ApiStatus.Internal
public EntityTeleportEndGatewayEvent(final Entity entity, final Location from, final Location to, final EndGateway gateway) {
super(entity, from, to);
this.gateway = gateway;
}
/**
* The gateway triggering the teleport
*
* @return EndGateway used
*/
public EndGateway getGateway() {
return this.gateway;
}
}