Class CustomTeleporterDestination
- java.lang.Object
-
- com.onarandombox.MultiverseCore.destination.CustomTeleporterDestination
-
- All Implemented Interfaces:
MVDestination
public abstract class CustomTeleporterDestination extends java.lang.Object implements MVDestination
-
-
Constructor Summary
Constructors Constructor Description CustomTeleporterDestination()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.bukkit.Location
getLocation(org.bukkit.entity.Entity entity)
Returns the location a specific entity will spawn at when being teleported to this Destination.abstract Teleporter
getTeleporter()
org.bukkit.util.Vector
getVelocity()
Returns the velocity vector for this destination.abstract java.lang.String
toString()
Returns a string that can easily be saved in the config that contains all the details needed to rebuild this destination.boolean
useSafeTeleporter()
Should the Multiverse SafeTeleporter be used?-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.onarandombox.MultiverseCore.api.MVDestination
getIdentifier, getName, getRequiredPermission, getType, isThisType, isValid, setDestination
-
-
-
-
Method Detail
-
getLocation
public final org.bukkit.Location getLocation(org.bukkit.entity.Entity entity)
Description copied from interface:MVDestination
Returns the location a specific entity will spawn at when being teleported to this Destination.To just retrieve the location as it is stored you can just pass null, but be warned some destinations may return null back to you if you do this. It is always safer to pass an actual entity. This is used so things like minecarts can be teleported.
Do not forget to use
MVDestination.getVelocity()
as destinations can use this too!- Specified by:
getLocation
in interfaceMVDestination
- Parameters:
entity
- The entity to be teleported.- Returns:
- The location of the entity.
-
getVelocity
public final org.bukkit.util.Vector getVelocity()
Description copied from interface:MVDestination
Returns the velocity vector for this destination.Plugins wishing to fully support MVDestinations MUST implement this.
- Specified by:
getVelocity
in interfaceMVDestination
- Returns:
- A vector representing the speed/direction the player should travel when arriving
-
useSafeTeleporter
public final boolean useSafeTeleporter()
Description copied from interface:MVDestination
Should the Multiverse SafeTeleporter be used?If not, MV will blindly take people to the location specified.
- Specified by:
useSafeTeleporter
in interfaceMVDestination
- Returns:
- True if the SafeTeleporter will be used, false if not.
-
toString
public abstract java.lang.String toString()
Description copied from interface:MVDestination
Returns a string that can easily be saved in the config that contains all the details needed to rebuild this destination.ex: e:0,0,0:50:50
- Specified by:
toString
in interfaceMVDestination
- Overrides:
toString
in classjava.lang.Object
- Returns:
- The savable config string.
-
getTeleporter
public abstract Teleporter getTeleporter()
-
-