2011-12-06 16:28:48 +00:00
|
|
|
package com.earth2me.essentials.api;
|
|
|
|
|
2013-06-08 18:34:14 +00:00
|
|
|
import com.earth2me.essentials.IUser;
|
|
|
|
import com.earth2me.essentials.Trade;
|
2011-12-06 16:28:48 +00:00
|
|
|
import org.bukkit.Location;
|
2013-06-08 18:34:14 +00:00
|
|
|
import org.bukkit.entity.Player;
|
2011-12-07 01:12:36 +00:00
|
|
|
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
2011-12-06 16:28:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
public interface ITeleport
|
2013-06-09 12:38:09 +00:00
|
|
|
{
|
2013-04-30 16:25:25 +00:00
|
|
|
/**
|
2013-06-08 18:34:14 +00:00
|
|
|
* Used to skip teleportPlayer delay when teleporting someone to a location or player.
|
|
|
|
*
|
|
|
|
* @param loc - Where should the player end up
|
|
|
|
* @param cooldown - If cooldown should be enforced
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
2013-04-30 16:25:25 +00:00
|
|
|
* @throws Exception
|
|
|
|
*/
|
2011-12-07 01:12:36 +00:00
|
|
|
void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception;
|
2013-06-08 18:34:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to skip teleportPlayer delay when teleporting someone to a location or player.
|
|
|
|
*
|
|
|
|
* @param entity - Where should the player end up
|
|
|
|
* @param cooldown - If cooldown should be enforced
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception;
|
|
|
|
|
2013-06-09 12:38:09 +00:00
|
|
|
@Deprecated
|
|
|
|
void teleport(Location loc, Trade chargeFor) throws Exception;
|
|
|
|
|
2013-06-08 18:34:14 +00:00
|
|
|
/**
|
|
|
|
* Teleport a player to a specific location
|
|
|
|
*
|
|
|
|
* @param loc - Where should the player end up
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport a player to a specific player
|
|
|
|
*
|
|
|
|
* @param entity - Where should the player end up
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
void teleport(Player entity, Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport a player to a specific location
|
|
|
|
*
|
|
|
|
* @param otherUser - Which user will be teleported
|
|
|
|
* @param loc - Where should the player end up
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
void teleportPlayer(IUser otherUser, Location loc, Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport a player to a specific player
|
|
|
|
*
|
|
|
|
* @param otherUser - Which user will be teleported
|
|
|
|
* @param entity - Where should the player end up
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
void teleportPlayer(IUser otherUser, Player entity, Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport wrapper used to handle teleporting players to them, like /tphere
|
|
|
|
*
|
|
|
|
* @param otherUser - Which user will be teleported
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public void teleportToMe(IUser otherUser, Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport wrapper used to handle tp fallback on /jail and /home
|
|
|
|
*
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport wrapper used to handle /warp teleports
|
|
|
|
*
|
|
|
|
* @param otherUser - Which user will be teleported
|
|
|
|
* @param warp - The name of the warp the user will be teleported too.
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @param cause - The reported teleportPlayer cause
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public void warp(IUser otherUser, String warp, Trade chargeFor, TeleportCause cause) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport wrapper used to handle /back teleports
|
|
|
|
*
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public void back(Trade chargeFor) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport wrapper used to handle throwing user home after a jail sentence
|
|
|
|
*
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public void back() throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Teleport wrapper used to handle /home teleports
|
|
|
|
*
|
|
|
|
* @param loc - Location where player will be teleported too
|
|
|
|
* @param chargeFor - What the user will be charged if teleportPlayer is successful
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public void home(Location loc, Trade chargeFor) throws Exception;
|
2011-12-06 16:28:48 +00:00
|
|
|
}
|