Class CustomTeleporterDestination

  • All Implemented Interfaces:
    MVDestination

    public abstract class CustomTeleporterDestination
    extends java.lang.Object
    implements MVDestination
    • Constructor Detail

      • CustomTeleporterDestination

        public CustomTeleporterDestination()
    • 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 interface MVDestination
        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 interface MVDestination
        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 interface MVDestination
        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 interface MVDestination
        Overrides:
        toString in class java.lang.Object
        Returns:
        The savable config string.
      • getTeleporter

        public abstract Teleporter getTeleporter()