Package dev.deepcore.challenge.preview
Class PreviewAnchorService
java.lang.Object
dev.deepcore.challenge.preview.PreviewAnchorService
Resolves preview anchors and lobby teleport/respawn locations.
-
Constructor Summary
ConstructorsConstructorDescriptionPreviewAnchorService(org.bukkit.plugin.java.JavaPlugin plugin, Supplier<WorldResetManager> worldResetManagerSupplier) Creates a preview anchor service. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationReturns the preferred lobby teleport location derived from preview anchor settings.org.bukkit.LocationresolveLobbyRespawnLocation(org.bukkit.World deathWorld) Resolves a lobby respawn location for deaths occurring in a lobby world.org.bukkit.LocationResolves the configured preview anchor for the active lobby world.voidteleportToLobbyIfConfigured(org.bukkit.entity.Player player) Teleports a player to lobby when default limbo spawning is configured.
-
Constructor Details
-
PreviewAnchorService
public PreviewAnchorService(org.bukkit.plugin.java.JavaPlugin plugin, Supplier<WorldResetManager> worldResetManagerSupplier) Creates a preview anchor service.- Parameters:
plugin- plugin instance used for configuration accessworldResetManagerSupplier- supplier for active world reset manager
-
-
Method Details
-
resolvePreviewAnchor
public org.bukkit.Location resolvePreviewAnchor()Resolves the configured preview anchor for the active lobby world.- Returns:
- preview anchor location, or null when no lobby context is available
-
getPreferredLobbyTeleportLocation
public org.bukkit.Location getPreferredLobbyTeleportLocation()Returns the preferred lobby teleport location derived from preview anchor settings.- Returns:
- preferred lobby teleport location, or null when unavailable
-
teleportToLobbyIfConfigured
public void teleportToLobbyIfConfigured(org.bukkit.entity.Player player) Teleports a player to lobby when default limbo spawning is configured.- Parameters:
player- player to relocate to lobby
-
resolveLobbyRespawnLocation
public org.bukkit.Location resolveLobbyRespawnLocation(org.bukkit.World deathWorld) Resolves a lobby respawn location for deaths occurring in a lobby world.- Parameters:
deathWorld- world where the death occurred- Returns:
- respawn location in lobby context, or null when death world is unavailable
-