Class TeleportProvider

java.lang.Object
cn.lunadeer.dominion.providers.TeleportProvider

public abstract class TeleportProvider extends Object
API entry point for local and cross-server dominion teleportation.

Teleports are scheduled on the player's entity thread and complete asynchronously.

  • Field Details

    • instance

      protected static TeleportProvider instance
      The provider instance initialized by Dominion.
  • Constructor Details

    • TeleportProvider

      public TeleportProvider()
  • Method Details

    • getInstance

      public static TeleportProvider getInstance()
      Gets the initialized provider instance.
      Returns:
      the provider, or null before Dominion initialization
    • teleport

      public abstract CompletableFuture<Boolean> teleport(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull DominionDTO dominion)
      Teleports a player to a dominion's configured teleport location.
      Parameters:
      player - the player to teleport
      dominion - the destination dominion
      Returns:
      a future containing true when the teleport succeeds and false when the teleport is rejected