Class PreviewAnchorService

java.lang.Object
dev.deepcore.challenge.preview.PreviewAnchorService

public final class PreviewAnchorService extends Object
Resolves preview anchors and lobby teleport/respawn locations.
  • 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 access
      worldResetManagerSupplier - 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