Class MythicDungeons

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
net.playavalon.mythicdungeons.MythicDungeons
All Implemented Interfaces:
MythicDungeonsService, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public final class MythicDungeons extends org.bukkit.plugin.java.JavaPlugin implements MythicDungeonsService
  • Field Details

    • debugPrefix

      public static String debugPrefix
  • Constructor Details

    • MythicDungeons

      public MythicDungeons()
  • Method Details

    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • reload

      public void reload()
    • reloadAllDungeons

      public void reloadAllDungeons()
    • reloadDungeon

      public void reloadDungeon(Dungeon dungeon)
    • reloadConfigs

      public void reloadConfigs()
    • initEditMenu

      public void initEditMenu()
    • getVersion

      public String getVersion()
      Returns the MythicDungeons plugin version
      Returns:
      int
    • getBuildNumber

      public String getBuildNumber()
      Returns the MythicDungeons development build version
      Returns:
      int
    • getMythicPlayer

      public MythicPlayer getMythicPlayer(org.bukkit.entity.Player player)
    • getMythicPlayer

      public MythicPlayer getMythicPlayer(UUID uuid)
    • sendToDungeon

      public boolean sendToDungeon(org.bukkit.entity.Player player, String dungeonName)
    • getDungeonsFolder

      public File getDungeonsFolder()
    • getDungeonManager

      public DungeonManager getDungeonManager()
    • registerFunction

      public <T extends DungeonFunction> void registerFunction(Class<T> function)
    • registerTrigger

      public <T extends DungeonTrigger> void registerTrigger(Class<T> trigger)
    • registerCondition

      public <T extends TriggerCondition> void registerCondition(Class<T> condition)
    • registerFunctions

      public void registerFunctions(String functionsPackage)
    • registerTriggers

      public void registerTriggers(String triggersPackage)
    • registerConditions

      public void registerConditions(String conditionsPackage)
    • inst

      public static MythicDungeons inst()
    • isPlayerInDungeon

      public boolean isPlayerInDungeon(org.bukkit.entity.Player player)
      Description copied from interface: MythicDungeonsService
      Returns true if the player is in a dungeon.
      Specified by:
      isPlayerInDungeon in interface MythicDungeonsService
      Parameters:
      player - The player to check.
    • getDungeonInstance

      public Instance getDungeonInstance(org.bukkit.entity.Player player)
      Description copied from interface: MythicDungeonsService
      Returns the instance the player is in.
      Specified by:
      getDungeonInstance in interface MythicDungeonsService
      Parameters:
      player - The player to check for.
      Returns:
      The instance the player is in, or null if not in a dungeon.
    • getDungeonInstance

      public Instance getDungeonInstance(String worldName)
      Description copied from interface: MythicDungeonsService
      Get the dungeon instance associated with the passed in world name.
      Specified by:
      getDungeonInstance in interface MythicDungeonsService
      Returns:
      The dungeon instance associated with the passed in world name, or null if not found.
    • getAllDungeons

      public Collection<Dungeon> getAllDungeons()
      Description copied from interface: MythicDungeonsService
      Get all registered dungeon objects.
      Specified by:
      getAllDungeons in interface MythicDungeonsService
      Returns:
      A collection of all the registered dungeons on the server.
    • initiateDungeonForPlayer

      public boolean initiateDungeonForPlayer(org.bukkit.entity.Player player, String dungeonName)
      Description copied from interface: MythicDungeonsService
      Initiate a dungeon instance for a player (and coordinating party) based on the dungeon name.
      Specified by:
      initiateDungeonForPlayer in interface MythicDungeonsService
      Parameters:
      player - The player to initiate for.
      dungeonName - The name of the dungeon to initiate.
      Returns:
      True if the player successfully initiated a dungeon instance, else false.
    • createParty

      public boolean createParty(org.bukkit.entity.Player target)
      Description copied from interface: MythicDungeonsService
      Creates a party for a player.
      Specified by:
      createParty in interface MythicDungeonsService
      Parameters:
      target - The player to create a party for.
      Returns:
      True if the player was successfully added to a party, else false.
    • removeFromParty

      public boolean removeFromParty(org.bukkit.entity.Player target)
      Description copied from interface: MythicDungeonsService
      Removes a player from the current party they are in.
      Specified by:
      removeFromParty in interface MythicDungeonsService
      Parameters:
      target - The player to remove from the party they are currently in.
      Returns:
      True if the player was successfully removed from their party, else false.
    • disbandParty

      public boolean disbandParty(MythicParty party)
      Description copied from interface: MythicDungeonsService
      Disbands a party.
      Specified by:
      disbandParty in interface MythicDungeonsService
      Parameters:
      party - The party to disband.
      Returns:
      True if the party was successfully disbanded, else false.
    • disbandParty

      public boolean disbandParty(org.bukkit.entity.Player target)
      Description copied from interface: MythicDungeonsService
      Disbands the party that a player is a part of. NOTE: This will effectively remove ALL players that are in a party from that party!
      Specified by:
      disbandParty in interface MythicDungeonsService
      Parameters:
      target - The player to disband the party for.
      Returns:
      True if the party was successfully disbanded, else false.
    • inviteToParty

      public boolean inviteToParty(org.bukkit.entity.Player source, org.bukkit.entity.Player target)
      Description copied from interface: MythicDungeonsService
      Invites a player to a party based on the inviter's party.
      Specified by:
      inviteToParty in interface MythicDungeonsService
      Parameters:
      source - The player who owns the party to invite to.
      target - The player to invite to the party.
      Returns:
      True if the player was successfully invited to the party, else false.
    • acceptPartyInvite

      public boolean acceptPartyInvite(org.bukkit.entity.Player target)
      Description copied from interface: MythicDungeonsService
      Accepts the pending party invite for a player if one exists.
      Specified by:
      acceptPartyInvite in interface MythicDungeonsService
      Parameters:
      target - The player to accept the party invite for.
      Returns:
      True if the player successfully accepted a pending party invite, else false.
    • declinePartyInvite

      public boolean declinePartyInvite(org.bukkit.entity.Player target)
      Description copied from interface: MythicDungeonsService
      Declines the pending party invite for a player if one exists.
      Specified by:
      declinePartyInvite in interface MythicDungeonsService
      Parameters:
      target - The player to decline the party invite for.
      Returns:
      True if the player successfully declined a pending party invite, else false.
    • setPartyLeader

      public boolean setPartyLeader(org.bukkit.entity.Player player)
      Description copied from interface: MythicDungeonsService
      Sets the party leader for a player's party.
      Specified by:
      setPartyLeader in interface MythicDungeonsService
      Parameters:
      player - The player to set as party leader of their party.
      Returns:
      True if the player successfully set the party leader, else false.
    • getParty

      public MythicParty getParty(org.bukkit.entity.Player player)
      Description copied from interface: MythicDungeonsService
      Returns the party that a player is in.
      Specified by:
      getParty in interface MythicDungeonsService
      Parameters:
      player - The player to get the party from.
      Returns:
      The party that the player is in, or null if the player is not in a party.
    • isPartyQueuedForDungeon

      @Nullable public String isPartyQueuedForDungeon(org.bukkit.entity.Player player)
      Description copied from interface: MythicDungeonsService
      Returns the party that a player is in.
      Specified by:
      isPartyQueuedForDungeon in interface MythicDungeonsService
      Parameters:
      player - The player to check their party's queue status for.
      Returns:
      The dungeon name for the dungeon the party is queued for, otherwise null.
    • isPartyQueuedForDungeon

      @Nullable public String isPartyQueuedForDungeon(IDungeonParty party)
      Description copied from interface: MythicDungeonsService
      Returns the party that a player is in.
      Specified by:
      isPartyQueuedForDungeon in interface MythicDungeonsService
      Parameters:
      party - The party to check the queue status for.
      Returns:
      The dungeon name for the dungeon the party is queued for, otherwise null.