Class TrainingManager

java.lang.Object
dev.deepcore.challenge.training.TrainingManager
All Implemented Interfaces:
org.bukkit.event.Listener

public final class TrainingManager extends Object implements org.bukkit.event.Listener
Manages training-world mini-challenges, timers, HUD output, and persistence.
  • Constructor Details

    • TrainingManager

      public TrainingManager(org.bukkit.plugin.java.JavaPlugin plugin)
      Creates a training manager with configuration-backed behavior.
      Parameters:
      plugin - plugin instance
  • Method Details

    • initialize

      public void initialize()
      Initializes configuration, persistence, listener registration, and HUD tasks.
    • shutdown

      public void shutdown()
      Stops scheduled tasks and flushes stats to disk.
    • reloadFromConfig

      public void reloadFromConfig()
      Reloads training configuration from plugin config.
    • handleCommand

      public boolean handleCommand(org.bukkit.command.CommandSender sender, String[] args)
      Handles `/challenge train ...` command execution.
      Parameters:
      sender - command sender
      args - full `/challenge` argument array
      Returns:
      true after handling the command
    • tabComplete

      public List<String> tabComplete(String[] args)
      Returns tab completions for `/challenge train ...` arguments.
      Parameters:
      args - full `/challenge` argument array
      Returns:
      completions for train subcommand context
    • returnToTrainingLobby

      public void returnToTrainingLobby(org.bukkit.entity.Player player)
      Returns a player from their training attempt to the training lobby.
      Parameters:
      player - player to return to lobby
    • isInActiveAttempt

      public boolean isInActiveAttempt(org.bukkit.entity.Player player)
    • leaveTraining

      public void leaveTraining(org.bukkit.entity.Player player)
      Cancels any active attempt and cleans up return-item state for the player.
      Parameters:
      player - player leaving the training area
    • onStartButtonPress

      public void onStartButtonPress(org.bukkit.event.player.PlayerInteractEvent event)
    • onBridgeCompletionPlate

      public void onBridgeCompletionPlate(org.bukkit.event.player.PlayerInteractEvent event)
    • onPortalCreate

      public void onPortalCreate(org.bukkit.event.world.PortalCreateEvent event)
    • onPortalBlockForm

      public void onPortalBlockForm(org.bukkit.event.block.BlockFormEvent event)
    • onCraftItem

      public void onCraftItem(org.bukkit.event.inventory.CraftItemEvent event)
    • onChestClick

      public void onChestClick(org.bukkit.event.inventory.InventoryClickEvent event)
    • onChestDrag

      public void onChestDrag(org.bukkit.event.inventory.InventoryDragEvent event)
    • onChestChallengeInventoryClose

      public void onChestChallengeInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)
    • onChestChallengeBlockBreak

      public void onChestChallengeBlockBreak(org.bukkit.event.block.BlockBreakEvent event)
    • onAttemptPlayerMove

      public void onAttemptPlayerMove(org.bukkit.event.player.PlayerMoveEvent event)
    • onAttemptTeleport

      public void onAttemptTeleport(org.bukkit.event.player.PlayerTeleportEvent event)
    • onAttemptQuit

      public void onAttemptQuit(org.bukkit.event.player.PlayerQuitEvent event)
    • onAttemptKick

      public void onAttemptKick(org.bukkit.event.player.PlayerKickEvent event)
    • onPlayerDeath

      public void onPlayerDeath(org.bukkit.event.entity.PlayerDeathEvent event)
    • onPlayerRespawn

      public void onPlayerRespawn(org.bukkit.event.player.PlayerRespawnEvent event)
    • onBridgePlace

      public void onBridgePlace(org.bukkit.event.block.BlockPlaceEvent event)