Interface PortalType

    • Method Detail

      • generatePortal

        boolean generatePortal​(ServerLocation location,
                               Axis axis)
        Generates the portal at the location.

        It is left up to the discretion of the plugin developer on how this is implemented. Portals come in all shapes and sizes or none at all.

        The location and axis are meant to be hints and should not be considered to be the exact final location/orientation of the resulting portal.

        Parameters:
        location - The location
        axis - The axis
        Returns:
        true if a portal could be generated
      • findPortal

        Optional<Portal> findPortal​(ServerLocation location)
        Finds a Portal from a location.

        It is left up to the discretion of the plugin developer on how this is implemented. In vanilla minecraft, portals are calculated on-demand and therefore this may never return an actual value.

        The location is meant to be a hint and no expectation should be made that the Portal will be exactly at the location.

        Parameters:
        location - The location
        Returns:
        The portal or Optional.empty() if not found
      • teleport

        boolean teleport​(Entity entity,
                         ServerLocation destination,
                         boolean generateDestinationPortal)
        Teleports an Entity through this portal.

        The location is meant to be a hint and no expectation should be made that the portal will be exactly at the location.

        No assumption should be made that the generation of the destination portal will match the original portal, this is left up to the plugin dev to decide.

        Parameters:
        entity - The entity
        destination - The destination
        generateDestinationPortal - True if the portal should generate a destination one
        Returns:
        True if teleport successful, false if not