package net.knarcraft.stargate.container; import net.knarcraft.stargate.portal.Portal; import org.bukkit.entity.Player; /** * This class represents a player teleporting from the end to the over-world using an artificial end portal * *

This is necessary because a player entering an end portal in the end is a special case. Instead of being * teleported, the player is respawned. Because of this, the teleportation needs to be saved and later used to hijack * the position of where the player is to respawn.

*/ public class FromTheEndTeleportation { private final Player teleportingPlayer; private final Portal exitPortal; /** * Instantiates a new teleportation from the end * * @param teleportingPlayer

The teleporting player

* @param exitPortal

The portal to exit from

*/ public FromTheEndTeleportation(Player teleportingPlayer, Portal exitPortal) { this.teleportingPlayer = teleportingPlayer; this.exitPortal = exitPortal; } /** * Gets the teleporting player * * @return

The teleporting player

*/ public Player getPlayer() { return this.teleportingPlayer; } /** * Gets the portal to exit from * * @return

The portal to exit from

*/ public Portal getExit() { return this.exitPortal; } }