Package cn.lunadeer.dominion.providers
Class TeleportProvider
java.lang.Object
cn.lunadeer.dominion.providers.TeleportProvider
API entry point for local and cross-server dominion teleportation.
Teleports are scheduled on the player's entity thread and complete asynchronously.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static TeleportProviderThe provider instance initialized by Dominion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TeleportProviderGets the initialized provider instance.abstract CompletableFuture<Boolean>teleport(@NotNull org.bukkit.entity.Player player, @NotNull DominionDTO dominion) Teleports a player to a dominion's configured teleport location.
-
Field Details
-
instance
The provider instance initialized by Dominion.
-
-
Constructor Details
-
TeleportProvider
public TeleportProvider()
-
-
Method Details
-
getInstance
Gets the initialized provider instance.- Returns:
- the provider, or
nullbefore 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 teleportdominion- the destination dominion- Returns:
- a future containing
truewhen the teleport succeeds andfalsewhen the teleport is rejected
-