Class Instance
java.lang.Object
net.playavalon.mythicdungeons.dungeons.Instance
-
Constructor Summary
ConstructorDescriptionInstance
(Dungeon dungeon, boolean edit, CountDownLatch latch) Instance
(Dungeon dungeon, CountDownLatch latch) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFunctionLabel
(DungeonFunction function) void
addHologram
(FunctionHologram function) void
addPlayer
(MythicPlayer aPlayer) void
addPlayerReward
(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack... items) void
applyLootCooldowns
(org.bukkit.entity.Player player) void
autosave()
Automatically saves the dungeon.int
Used to clean up signs in function locations.void
commitWorld
(CountDownLatch latch) Saves the edited dungeon world to the MythicDungeons.inst() 'maps' folder.void
dispose()
Used to clean up the instance after all players have left.void
messagePlayers
(String message) void
pushPlayerRewards
(org.bukkit.entity.Player player) void
removeFunctionLabelByFunction
(DungeonFunction function) void
removePlayer
(MythicPlayer mPlayer) void
removePlayer
(MythicPlayer aPlayer, boolean force) void
Saves and commits the map.void
saveWorld
(CountDownLatch latch) void
setReceivedRewards
(org.bukkit.entity.Player player, boolean received) void
Sends players to the "start" point and initializes all functions.void
updateHologram
(FunctionHologram function) void
updateLabel
(DungeonFunction function)
-
Constructor Details
-
Instance
- Parameters:
dungeon
- The dungeon object this is an instance of.latch
- A latch used to notify the awaiting player when the instance is loaded and ready for them to be teleport in.
-
Instance
- Parameters:
dungeon
- The dungeon object this is an instance of.edit
- Whether this instance is being used to edit the dungeon.latch
- A latch used to notify the awaiting player when the instance is loaded and ready for them to be teleport in.
-
-
Method Details
-
startGame
public void startGame()Sends players to the "start" point and initializes all functions. -
dispose
public void dispose()Used to clean up the instance after all players have left. Includes saving for edit worlds. -
addPlayer
-
removePlayer
-
removePlayer
-
messagePlayers
-
setReceivedRewards
public void setReceivedRewards(org.bukkit.entity.Player player, boolean received) -
autosave
public void autosave()Automatically saves the dungeon. -
saveWorld
public void saveWorld()Saves and commits the map. -
saveWorld
-
commitWorld
Saves the edited dungeon world to the MythicDungeons.inst() 'maps' folder. -
addFunctionLabel
-
updateLabel
-
addHologram
-
updateHologram
-
removeFunctionLabelByFunction
-
addPlayerReward
public void addPlayerReward(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack... items) -
pushPlayerRewards
public void pushPlayerRewards(org.bukkit.entity.Player player) -
applyLootCooldowns
public void applyLootCooldowns(org.bukkit.entity.Player player) -
cleanSigns
public int cleanSigns()Used to clean up signs in function locations. Most useful fresh after a dxl import.- Returns:
- The number of signs cleaned up.
-