Class Instance

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

public class Instance extends Object
  • Constructor Details

    • Instance

      public Instance(Dungeon dungeon, CountDownLatch latch)
      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

      public Instance(Dungeon dungeon, boolean edit, CountDownLatch latch)
      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

      public void addPlayer(MythicPlayer aPlayer)
    • removePlayer

      public void removePlayer(MythicPlayer mPlayer)
    • removePlayer

      public void removePlayer(MythicPlayer aPlayer, boolean force)
    • messagePlayers

      public void messagePlayers(String message)
    • 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

      public void saveWorld(CountDownLatch latch)
    • commitWorld

      public void commitWorld(@Nullable CountDownLatch latch)
      Saves the edited dungeon world to the MythicDungeons.inst() 'maps' folder.
    • addFunctionLabel

      public void addFunctionLabel(DungeonFunction function)
    • updateLabel

      public void updateLabel(DungeonFunction function)
    • addHologram

      public void addHologram(FunctionHologram function)
    • updateHologram

      public void updateHologram(FunctionHologram function)
    • removeFunctionLabelByFunction

      public void removeFunctionLabelByFunction(DungeonFunction function)
    • 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.