Interface PortalLogic


public interface PortalLogic
A type of portal, used to move entities one place to another.
  • Method Details

    • builder

      static PortalLogic.Builder builder()
    • factory

      static PortalLogic.Factory factory()
    • exitCalculator

    • finder

    • generator

    • 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