AutoHost

public class AutoHost

Bukkit-side orchestration for the magmaguy.com auto-hosting flow.

This class owns session state (rspUUID, firstUpload, done), the keep-alive scheduler, and the Bukkit-specific player notification path. The HTTP request/response plumbing is delegated to a shared MagmaguyRspClient from resourcepackmanager-http-common.

In network mode this class also runs a small always-on PackHttpServer that exposes the backend's Bedrock-conversion outputs (/bedrock.zip and /mappings.json) for the proxy plugin's NetworkSync to pull. The pack-zip route (used by Java self-hosting) 404s until getFinalResourcePack appears; the Bedrock routes 404 until BedrockConversion has produced output.

Properties

Link copied to clipboard
public static volatile Optional<String> cachedPublicIp
Cached public-IP result from detectPublicIp, computed once per initialize and reused thereafter so the outbound call to api.ipify.org isn't repeated on every keep-alive tick.
Link copied to clipboard
public static volatile String lastSelfHostCheck
Result of the latest self-host check, shown by /rspm status.
Link copied to clipboard
public static String rspUUID
Link copied to clipboard
public static volatile String selfHostedUrl

Functions

Link copied to clipboard
public static String currentResolvedHost()
Returns the host string the plugin would publish to clients right now.
Link copied to clipboard
public static void dataComplianceRequest()
Link copied to clipboard
public static void forgetPlayer(UUID playerId)
Drop a player's resend bookkeeping when they leave.
Link copied to clipboard
public static Optional<String> getCachedPublicIp()
Exposes the cached public-IP detection result for diagnostic commands (e.g.
Link copied to clipboard
public static String getLastSelfHostCheck()
Result of the latest self-host check, shown by /rspm status.
Link copied to clipboard
public static String getRspUUID()
Link copied to clipboard
public static String getSelfHostedUrl()
Link copied to clipboard
public static void handleResourcePackStatus(PlayerResourcePackStatusEvent event)
Self-heal a failed pack delivery by reacting to the client's own status report.
Link copied to clipboard
public static void initialize()
public static void initialize(BooleanSupplier runCancellation)
Link copied to clipboard
public static boolean isDone()
Link copied to clipboard
public static void publishBedrockOutputs()
Called by the mix pipeline immediately after BedrockConversion.generate() produces fresh output.
Link copied to clipboard
public static void scheduleJoinSend(Player player)
Send the pack to a joining player, deferred off the join tick.
Link copied to clipboard
public static void sendResourcePack(Player player)
Link copied to clipboard
public static void shutdown()
Link copied to clipboard
public static void withdrawBedrockOutputs()
Withdraws both relay artifacts after an ordinary conversion failure.