java.lang.Object
net.playavalon.mythicdungeons.dungeons.Dungeon

public class Dungeon extends Object
  • Constructor Details

    • Dungeon

      public Dungeon(@NotNull File folder) throws IOException, org.bukkit.configuration.InvalidConfigurationException
      Throws:
      IOException
      org.bukkit.configuration.InvalidConfigurationException
    • Dungeon

      public Dungeon(@NotNull File folder, @Nullable Map<String,Object> configValues) throws IOException, org.bukkit.configuration.InvalidConfigurationException
      Throws:
      IOException
      org.bukkit.configuration.InvalidConfigurationException
  • Method Details

    • hasAvailableInstances

      public boolean hasAvailableInstances()
    • backupDungeon

      public void backupDungeon()
    • instantiate

      public boolean instantiate(org.bukkit.entity.Player player)
      Attempts to create a new playable instance of this dungeon.
      Parameters:
      player - The player attempting to create a new instances.
      Returns:
      true if the dungeon was successfully instantiated, false otherwise.
    • edit

      public void edit(org.bukkit.entity.Player player)
      Sends the player to an edit session for this dungeon.
      Parameters:
      player - The player who will be editing the dungeon.
    • removeInstance

      public void removeInstance(Instance instance)
    • meetsRequirements

      public boolean meetsRequirements(org.bukkit.entity.Player player)
      Checks if the player meets the requirements for playing this dungeon.
      Parameters:
      player - The player we are validating the requirements against.
      Returns:
      true if requirements are met, false otherwise.
    • addFunction

      public void addFunction(org.bukkit.Location loc, DungeonFunction function)
    • removeFunction

      public void removeFunction(org.bukkit.Location loc)
    • getFunctions

      public HashMap<org.bukkit.Location,DungeonFunction> getFunctions()
    • saveFunctions

      public void saveFunctions()
    • loadFunctions

      public void loadFunctions() throws IOException, org.bukkit.configuration.InvalidConfigurationException
      Throws:
      IOException
      org.bukkit.configuration.InvalidConfigurationException
    • addAccessCooldown

      public void addAccessCooldown(org.bukkit.entity.Player player)
    • addAccessCooldown

      public void addAccessCooldown(org.bukkit.entity.Player player, Date resetTime)
    • hasAccessCooldown

      public boolean hasAccessCooldown(org.bukkit.entity.Player player)
    • getAccessCooldown

      public Date getAccessCooldown(org.bukkit.entity.Player player)
    • addLootCooldown

      public void addLootCooldown(org.bukkit.entity.Player player, FunctionReward reward)
    • addLootCooldown

      public void addLootCooldown(org.bukkit.entity.Player player, FunctionReward reward, Date resetTime)
    • hasLootCooldown

      public boolean hasLootCooldown(org.bukkit.entity.Player player, FunctionReward reward)
    • getLootUnlockTime

      public Date getLootUnlockTime(org.bukkit.entity.Player player, FunctionReward function)
    • getPlayerLootData

      public PlayerLootData getPlayerLootData(org.bukkit.entity.Player player)
    • loadCooldowns

      @Deprecated public void loadCooldowns()
      Deprecated.
      Loads player's cooldowns from file.
    • loadCooldown

      public void loadCooldown(UUID playerID)
      Loads the player's cooldown data into memory.
      Parameters:
      playerID - The UUID of the player we are loading the cooldowns of.
    • saveCooldowns

      public void saveCooldowns(org.bukkit.entity.Player player)
    • savePlayerData

      public void savePlayerData(org.bukkit.entity.Player player)
    • getPlayerData

      @Nullable public org.bukkit.configuration.file.FileConfiguration getPlayerData(UUID playerID)
    • hasPlayerCompletedDungeon

      public boolean hasPlayerCompletedDungeon(org.bukkit.entity.Player player)
    • setPlayerCompletedDungeon

      public void setPlayerCompletedDungeon(org.bukkit.entity.Player player)
    • setPlayerCompletedDungeon

      public void setPlayerCompletedDungeon(org.bukkit.entity.Player player, boolean complete)
    • banItem

      public void banItem(org.bukkit.inventory.ItemStack item)
    • unbanItem

      public boolean unbanItem(org.bukkit.inventory.ItemStack item)
    • addAccessKey

      public void addAccessKey(org.bukkit.inventory.ItemStack item)
    • removeAccessKey

      public boolean removeAccessKey(org.bukkit.inventory.ItemStack item)
    • isValidKey

      public boolean isValidKey(org.bukkit.inventory.ItemStack item)
    • getFirstKey

      public org.bukkit.inventory.ItemStack getFirstKey(org.bukkit.entity.Player player)
    • setLobbySpawn

      public void setLobbySpawn(org.bukkit.Location lobbySpawn)
    • setStartSpawn

      public void setStartSpawn(org.bukkit.Location startSpawn)
    • setExit

      public void setExit(org.bukkit.Location loc)
    • getNextUnlockTime

      public Date getNextUnlockTime()
    • getNextLootTime

      public Date getNextLootTime()
    • saveConfig

      public void saveConfig() throws IOException
      Throws:
      IOException