Package de.erethon.dungeonsxl.api
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateGroup(org.bukkit.entity.Player leader)
Creates a new group.createGroup(org.bukkit.entity.Player leader, Dungeon dungeon)
Creates a new group.createGroup(org.bukkit.entity.Player leader, PlayerGroup.Color color)
Creates a new group.createGroup(org.bukkit.entity.Player leader, String name)
Creates a new group.createGroup(org.bukkit.entity.Player leader, Collection<org.bukkit.entity.Player> members, String name, Dungeon dungeon)
Creates a new group.de.erethon.caliburn.CaliburnAPI
Returns the loaded instance of the Caliburn API.de.erethon.commons.misc.Registry<String,PlayerClass>
Returns a registry of the loaded classes.getDungeonMob(org.bukkit.entity.LivingEntity entity)
Returns an existingDungeonMob
object that wraps the givenLivingEntity
object or null if none exists.Returns a registry of the dungeons.getEditWorld(org.bukkit.World world)
Returns the EditWorld that wraps the given instance world.de.erethon.commons.misc.Registry<String,ExternalMobProvider>
Returns a registry of the external mob providers.getGame(org.bukkit.entity.Player player)
Returns the game the given player plays.getGame(org.bukkit.World world)
Returns the game played in the given instance world.Returns a cache of Game objects.Returns a registry of the game rules.getGameWorld(org.bukkit.World world)
Returns the GameWorld that wraps the given instance world.de.erethon.commons.misc.Registry<String,PlayerGroup>
Returns a cache of the player groups.de.erethon.commons.misc.Registry<Integer,InstanceWorld>
Returns a cache of the instance worlds.de.erethon.commons.misc.Registry<String,ResourceWorld>
Returns a registry of the resources worlds.Returns a cache of player wrapper objects.getPlayerGroup(org.bukkit.entity.Player member)
Returns the group the player is a member of or null if he is in none.de.erethon.commons.misc.Registry<String,Class<? extends Requirement>>
Returns a registry of the requirement types.Returns a registry of the reward types.de.erethon.commons.misc.Registry<String,Class<? extends DungeonSign>>
Returns a registry of the sign types.boolean
isDungeonItem(org.bukkit.inventory.ItemStack itemStack)
Returns if the given item stack is a dungeon item.boolean
isInstance(org.bukkit.World world)
Returns if the given world is an instance.void
registerGroupAdapter(GroupAdapter groupAdapter)
Makes DungeonsXL track external group and synchronize them with its own groups.void
registerModule(DungeonModule module)
Registers a DungeonModule.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.wrapEntity(org.bukkit.entity.LivingEntity entity, GameWorld gameWorld, de.erethon.caliburn.mob.ExMob type)
Wraps the givenLivingEntity
object in aDungeonMob
object.wrapEntity(org.bukkit.entity.LivingEntity entity, GameWorld gameWorld, de.erethon.caliburn.mob.ExMob type, String triggerId)
Wraps the givenLivingEntity
object in aDungeonMob
object.wrapEntity(org.bukkit.entity.LivingEntity entity, GameWorld gameWorld, String triggerId)
Wraps the givenLivingEntity
object in aDungeonMob
object.Methods inherited from interface org.bukkit.command.CommandExecutor
onCommand
Methods inherited from interface org.bukkit.plugin.Plugin
getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getName, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onDisable, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable
Methods inherited from interface org.bukkit.command.TabCompleter
onTabComplete
-
Field Details
-
PLUGIN_ROOT
-
BACKUPS
-
LANGUAGES
-
MAPS
-
PLAYERS
-
SCRIPTS
-
CLASSES
-
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
Returns a registry of the reward types.- Returns:
- a registry of the reward types
-
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
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
Registers a DungeonModule.- Parameters:
module
- the module to register
-
registerGroupAdapter
Makes DungeonsXL track external group and synchronize them with its own groups.- Parameters:
groupAdapter
- the group adapter to register
-
createGroup
Creates a new group.- Parameters:
leader
- the leader- Returns:
- a new group
-
createGroup
Creates a new group.- Parameters:
leader
- the leadercolor
- the color that represents the group and sets the name- Returns:
- a new group or null if values are invalid
-
createGroup
Creates a new group.- Parameters:
leader
- the leadername
- the group's name - must be unique- Returns:
- a new group or null if values are invalid
-
createGroup
Creates a new group.- Parameters:
leader
- the leaderdungeon
- 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 leadermembers
- the group members with or without the leadername
- the name of the groupdungeon
- 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 givenLivingEntity
object in aDungeonMob
object.- Parameters:
entity
- the entitygameWorld
- the game world where the entity istriggerId
- 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 givenLivingEntity
object in aDungeonMob
object.- Parameters:
entity
- the entitygameWorld
- the game world where the entity istype
- 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 givenLivingEntity
object in aDungeonMob
object.- Parameters:
entity
- the entitygameWorld
- the game world where the entity istype
- the ExMob type of the entitytriggerId
- the identifier used in mob triggers- Returns:
- the wrapped DungeonMob
-
getDungeonMob
Returns an existingDungeonMob
object that wraps the givenLivingEntity
object or null if none exists.- Parameters:
entity
- the entity- Returns:
- an existing
DungeonMob
object that wraps the givenLivingEntity
object or null if none exists
-
getPlayerGroup
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
Returns the game the given player plays.- Parameters:
player
- the player- Returns:
- the game the given player plays
-
getGame
Returns the game played in the given instance world.- Parameters:
world
- the instance world- Returns:
- the game played in the given instance world
-
getGameWorld
Returns the GameWorld that wraps the given instance world.- Parameters:
world
- the instance world- Returns:
- the GameWorld that wraps the given instance world
-
getEditWorld
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 stackdungeonItem
- if the item stack- Returns:
- a copy of the item stack that is a dungeon item
-