Class WorldResetManager

java.lang.Object
dev.deepcore.challenge.world.WorldResetManager

public final class WorldResetManager extends Object
Manages world lifecycle operations for run resets and lobby/disco behavior.
  • 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 config
      challengeSessionWorldBridge - 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()