Class Dungeon
java.lang.Object
net.playavalon.mythicdungeons.dungeons.Dungeon
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccessCooldown
(org.bukkit.entity.Player player) void
addAccessCooldown
(org.bukkit.entity.Player player, Date resetTime) void
addAccessKey
(org.bukkit.inventory.ItemStack item) void
addFunction
(org.bukkit.Location loc, DungeonFunction function) void
addLootCooldown
(org.bukkit.entity.Player player, FunctionReward reward) void
addLootCooldown
(org.bukkit.entity.Player player, FunctionReward reward, Date resetTime) void
void
banItem
(org.bukkit.inventory.ItemStack item) void
edit
(org.bukkit.entity.Player player) Sends the player to an edit session for this dungeon.getAccessCooldown
(org.bukkit.entity.Player player) org.bukkit.inventory.ItemStack
getFirstKey
(org.bukkit.entity.Player player) HashMap<org.bukkit.Location,
DungeonFunction> getLootUnlockTime
(org.bukkit.entity.Player player, FunctionReward function) org.bukkit.configuration.file.FileConfiguration
getPlayerData
(UUID playerID) getPlayerLootData
(org.bukkit.entity.Player player) boolean
hasAccessCooldown
(org.bukkit.entity.Player player) boolean
boolean
hasLootCooldown
(org.bukkit.entity.Player player, FunctionReward reward) boolean
hasPlayerCompletedDungeon
(org.bukkit.entity.Player player) boolean
instantiate
(org.bukkit.entity.Player player) Attempts to create a new playable instance of this dungeon.boolean
isValidKey
(org.bukkit.inventory.ItemStack item) void
loadCooldown
(UUID playerID) Loads the player's cooldown data into memory.void
Deprecated.void
boolean
meetsRequirements
(org.bukkit.entity.Player player) Checks if the player meets the requirements for playing this dungeon.boolean
removeAccessKey
(org.bukkit.inventory.ItemStack item) void
removeFunction
(org.bukkit.Location loc) void
removeInstance
(Instance instance) void
void
saveCooldowns
(org.bukkit.entity.Player player) void
void
savePlayerData
(org.bukkit.entity.Player player) void
setExit
(org.bukkit.Location loc) void
setLobbySpawn
(org.bukkit.Location lobbySpawn) void
setPlayerCompletedDungeon
(org.bukkit.entity.Player player) void
setPlayerCompletedDungeon
(org.bukkit.entity.Player player, boolean complete) void
setStartSpawn
(org.bukkit.Location startSpawn) boolean
unbanItem
(org.bukkit.inventory.ItemStack item)
-
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
-
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
-
removeFunction
public void removeFunction(org.bukkit.Location loc) -
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
-
hasAccessCooldown
public boolean hasAccessCooldown(org.bukkit.entity.Player player) -
getAccessCooldown
-
addLootCooldown
-
addLootCooldown
-
hasLootCooldown
-
getLootUnlockTime
-
getPlayerLootData
-
loadCooldowns
Deprecated.Loads player's cooldowns from file. -
loadCooldown
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
-
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
-
getNextLootTime
-
saveConfig
- Throws:
IOException
-