Class BreakBlockChallenge

java.lang.Object
com.storytimeproductions.models.stgames.challenges.BreakBlockChallenge
All Implemented Interfaces:
StoryBlitzChallenge

public class BreakBlockChallenge extends Object implements StoryBlitzChallenge
Represents a challenge where players must break a block. This class implements the StoryBlitzChallenge interface.
  • Constructor Details

    • BreakBlockChallenge

      public BreakBlockChallenge(List<Cuboid> spawnRegions)
      Constructs a new BreakBlockChallenge with a random block type and count.
      Parameters:
      spawnRegions - List of Cuboid regions to spawn blocks in.
  • Method Details

    • getDescription

      public String getDescription()
      Returns the description of the challenge.
      Specified by:
      getDescription in interface StoryBlitzChallenge
      Returns:
      The description of the challenge.
    • start

      public void start(List<org.bukkit.entity.Player> players)
      Starts the challenge for the given players.
      Specified by:
      start in interface StoryBlitzChallenge
      Parameters:
      players - The players in the game.
    • isCompleted

      public boolean isCompleted(org.bukkit.entity.Player player)
      Checks if the player has completed the challenge.
      Specified by:
      isCompleted in interface StoryBlitzChallenge
      Parameters:
      player - The player to check.
      Returns:
      true if the player has completed the challenge, false otherwise.
    • cleanup

      public void cleanup(List<org.bukkit.entity.Player> players)
      Cleans up resources when the challenge ends.
      Specified by:
      cleanup in interface StoryBlitzChallenge
      Parameters:
      players - The players in the game.