Package dev.deepcore.challenge.world
Class WorldResetManager
java.lang.Object
dev.deepcore.challenge.world.WorldResetManager
Manages world lifecycle operations for run resets and lobby/disco behavior.
-
Constructor Summary
ConstructorsConstructorDescriptionWorldResetManager(org.bukkit.plugin.java.JavaPlugin plugin, ChallengeSessionWorldBridge challengeSessionWorldBridge) Creates a manager coordinating world operations for one plugin instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidCleans up stale non-default worlds when the server starts.voidApplies peaceful lobby policies to all configured lobby worlds.voidensureDiscoPreviewEffects(org.bukkit.Location center) Starts disco preview visuals/effects around the provided center location.voidEnsures required run worlds and optional lobby worlds are loaded.org.bukkit.Locationorg.bukkit.WorldbooleanbooleanisLobbyWorld(org.bukkit.World world) voidresetThreeWorlds(org.bukkit.command.CommandSender sender) Performs full overworld/nether/end reset while moving players to lobby.org.bukkit.WorldPicks one configured lobby world to use as the active lobby destination.booleanReturns whether the plugin should spawn players in lobby worlds by default.voidStops all disco preview audio and removes active disco displays.
-
Constructor Details
-
WorldResetManager
public WorldResetManager(org.bukkit.plugin.java.JavaPlugin plugin, ChallengeSessionWorldBridge challengeSessionWorldBridge) Creates a manager coordinating world operations for one plugin instance.- Parameters:
plugin- plugin root instance used for world APIs and configchallengeSessionWorldBridge- bridge to challenge session world hooks
-
-
Method Details
-
ensureThreeWorldsLoaded
public void ensureThreeWorldsLoaded()Ensures required run worlds and optional lobby worlds are loaded. -
cleanupNonDefaultWorldsOnStartup
public void cleanupNonDefaultWorldsOnStartup()Cleans up stale non-default worlds when the server starts. -
resetThreeWorlds
public void resetThreeWorlds(org.bukkit.command.CommandSender sender) Performs full overworld/nether/end reset while moving players to lobby.- Parameters:
sender- command sender requesting the world reset
-
enforceLobbyWorldPolicies
public void enforceLobbyWorldPolicies()Applies peaceful lobby policies to all configured lobby worlds. -
selectRandomLobbyWorld
public org.bukkit.World selectRandomLobbyWorld()Picks one configured lobby world to use as the active lobby destination.- Returns:
- selected active lobby world, or null when no lobby world could load
-
ensureDiscoPreviewEffects
public void ensureDiscoPreviewEffects(org.bukkit.Location center) Starts disco preview visuals/effects around the provided center location.- Parameters:
center- center location used for disco preview effects
-
stopDiscoPreviewAudio
public void stopDiscoPreviewAudio()Stops all disco preview audio and removes active disco displays. -
shouldSpawnInLimboByDefault
public boolean shouldSpawnInLimboByDefault()Returns whether the plugin should spawn players in lobby worlds by default.- Returns:
- true when default spawn-in-lobby behavior is enabled
-
getConfiguredLimboSpawn
public org.bukkit.Location getConfiguredLimboSpawn() -
isLobbyWorld
public boolean isLobbyWorld(org.bukkit.World world) -
getCurrentOverworld
public org.bukkit.World getCurrentOverworld() -
isCurrentOverworldDiscoVariant
public boolean isCurrentOverworldDiscoVariant()
-