Interface DungeonsAPI

All Superinterfaces:
org.bukkit.command.CommandExecutor, org.bukkit.plugin.Plugin, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor

public interface DungeonsAPI extends org.bukkit.plugin.Plugin
The API main interface.
Author:
Daniel Saukel
  • Field Details

    • PLUGIN_ROOT

      static final File PLUGIN_ROOT
    • BACKUPS

      static final File BACKUPS
    • LANGUAGES

      static final File LANGUAGES
    • MAPS

      static final File MAPS
    • PLAYERS

      static final File PLAYERS
    • SCRIPTS

      static final File SCRIPTS
    • CLASSES

      static final File CLASSES
    • DUNGEONS

      static final File DUNGEONS
  • Method Details

    • getCaliburn

      de.erethon.caliburn.CaliburnAPI getCaliburn()
      Returns the loaded instance of the Caliburn API.
      Returns:
      the loaded instance of the Caliburn API
    • getPlayerCache

      PlayerCache getPlayerCache()
      Returns a cache of player wrapper objects.
      Returns:
      a cache of player wrapper objects
    • getGameCache

      Collection<Game> getGameCache()
      Returns a cache of Game objects.
      Returns:
      a cache of Game objects
    • getClassRegistry

      de.erethon.commons.misc.Registry<String,​PlayerClass> getClassRegistry()
      Returns a registry of the loaded classes.
      Returns:
      a registry of the loaded classes
    • getSignRegistry

      de.erethon.commons.misc.Registry<String,​Class<? extends DungeonSign>> getSignRegistry()
      Returns a registry of the sign types.
      Returns:
      a registry of the sign types
    • getRequirementRegistry

      de.erethon.commons.misc.Registry<String,​Class<? extends Requirement>> getRequirementRegistry()
      Returns a registry of the requirement types.
      Returns:
      a registry of the requirement types
    • getRewardRegistry

      de.erethon.commons.misc.Registry<String,​Class<? extends Reward>> getRewardRegistry()
      Returns a registry of the reward types.
      Returns:
      a registry of the reward types
    • getDungeonRegistry

      de.erethon.commons.misc.Registry<String,​Dungeon> getDungeonRegistry()
      Returns a registry of the dungeons.
      Returns:
      a registry of the dungeons
    • getMapRegistry

      de.erethon.commons.misc.Registry<String,​ResourceWorld> getMapRegistry()
      Returns a registry of the resources worlds.
      Returns:
      a registry of the resources worlds
    • getInstanceCache

      de.erethon.commons.misc.Registry<Integer,​InstanceWorld> getInstanceCache()
      Returns a cache of the instance worlds.
      Returns:
      a cache of the instance worlds
    • getGameRuleRegistry

      de.erethon.commons.misc.Registry<String,​GameRule> getGameRuleRegistry()
      Returns a registry of the game rules.
      Returns:
      a registry of the game rules
    • getExternalMobProviderRegistry

      de.erethon.commons.misc.Registry<String,​ExternalMobProvider> getExternalMobProviderRegistry()
      Returns a registry of the external mob providers.
      Returns:
      a registry of the external mob providers
    • getGroupCache

      de.erethon.commons.misc.Registry<String,​PlayerGroup> getGroupCache()
      Returns a cache of the player groups.
      Returns:
      a cache of the player groups
    • registerModule

      void registerModule(DungeonModule module)
      Registers a DungeonModule.
      Parameters:
      module - the module to register
    • registerGroupAdapter

      void registerGroupAdapter(GroupAdapter groupAdapter)
      Makes DungeonsXL track external group and synchronize them with its own groups.
      Parameters:
      groupAdapter - the group adapter to register
    • createGroup

      PlayerGroup createGroup(org.bukkit.entity.Player leader)
      Creates a new group.
      Parameters:
      leader - the leader
      Returns:
      a new group
    • createGroup

      PlayerGroup createGroup(org.bukkit.entity.Player leader, PlayerGroup.Color color)
      Creates a new group.
      Parameters:
      leader - the leader
      color - the color that represents the group and sets the name
      Returns:
      a new group or null if values are invalid
    • createGroup

      PlayerGroup createGroup(org.bukkit.entity.Player leader, String name)
      Creates a new group.
      Parameters:
      leader - the leader
      name - the group's name - must be unique
      Returns:
      a new group or null if values are invalid
    • createGroup

      PlayerGroup createGroup(org.bukkit.entity.Player leader, Dungeon dungeon)
      Creates a new group.
      Parameters:
      leader - the leader
      dungeon - the dungeon to play
      Returns:
      a new group or null if values are invalid
    • createGroup

      PlayerGroup createGroup(org.bukkit.entity.Player leader, Collection<org.bukkit.entity.Player> members, String name, Dungeon dungeon)
      Creates a new group.
      Parameters:
      leader - the leader
      members - the group members with or without the leader
      name - the name of the group
      dungeon - the dungeon to play
      Returns:
      a new group or null if values are invalid
    • wrapEntity

      DungeonMob wrapEntity(org.bukkit.entity.LivingEntity entity, GameWorld gameWorld, String triggerId)
      Wraps the given LivingEntity object in a DungeonMob object.
      Parameters:
      entity - the entity
      gameWorld - the game world where the entity is
      triggerId - the identifier used in mob triggers
      Returns:
      the wrapped DungeonMob
    • wrapEntity

      DungeonMob wrapEntity(org.bukkit.entity.LivingEntity entity, GameWorld gameWorld, de.erethon.caliburn.mob.ExMob type)
      Wraps the given LivingEntity object in a DungeonMob object.
      Parameters:
      entity - the entity
      gameWorld - the game world where the entity is
      type - the ExMob type of the entity
      Returns:
      the wrapped DungeonMob
    • wrapEntity

      DungeonMob wrapEntity(org.bukkit.entity.LivingEntity entity, GameWorld gameWorld, de.erethon.caliburn.mob.ExMob type, String triggerId)
      Wraps the given LivingEntity object in a DungeonMob object.
      Parameters:
      entity - the entity
      gameWorld - the game world where the entity is
      type - the ExMob type of the entity
      triggerId - the identifier used in mob triggers
      Returns:
      the wrapped DungeonMob
    • getDungeonMob

      DungeonMob getDungeonMob(org.bukkit.entity.LivingEntity entity)
      Returns an existing DungeonMob object that wraps the given LivingEntity object or null if none exists.
      Parameters:
      entity - the entity
      Returns:
      an existing DungeonMob object that wraps the given LivingEntity object or null if none exists
    • getPlayerGroup

      PlayerGroup getPlayerGroup(org.bukkit.entity.Player member)
      Returns the group the player is a member of or null if he is in none.
      Parameters:
      member - the player
      Returns:
      the group the player is a member of or null if he is in none
    • getGame

      Game getGame(org.bukkit.entity.Player player)
      Returns the game the given player plays.
      Parameters:
      player - the player
      Returns:
      the game the given player plays
    • getGame

      Game getGame(org.bukkit.World world)
      Returns the game played in the given instance world.
      Parameters:
      world - the instance world
      Returns:
      the game played in the given instance world
    • getGameWorld

      GameWorld getGameWorld(org.bukkit.World world)
      Returns the GameWorld that wraps the given instance world.
      Parameters:
      world - the instance world
      Returns:
      the GameWorld that wraps the given instance world
    • getEditWorld

      EditWorld getEditWorld(org.bukkit.World world)
      Returns the EditWorld that wraps the given instance world.
      Parameters:
      world - the instance world
      Returns:
      the EditWorld that wraps the given instance worl
    • isInstance

      boolean isInstance(org.bukkit.World world)
      Returns if the given world is an instance.
      Parameters:
      world - the world
      Returns:
      if the given world is an instance
    • isDungeonItem

      boolean isDungeonItem(org.bukkit.inventory.ItemStack itemStack)
      Returns if the given item stack is a dungeon item.

      Dungeon items are items that are removed from the inventory when the dungeon is finished.

      Parameters:
      itemStack - the item stack
      Returns:
      if the given item stack is a dungeon item
    • setDungeonItem

      org.bukkit.inventory.ItemStack setDungeonItem(org.bukkit.inventory.ItemStack itemStack, boolean dungeonItem)
      Sets the given item stack to be a dungeon item and returns a copy with the updated state.

      Dungeon items are items that are removed from the inventory when the dungeon is finished.

      Parameters:
      itemStack - the item stack
      dungeonItem - if the item stack
      Returns:
      a copy of the item stack that is a dungeon item