Package de.erethon.dungeonsxl.api.world
Interface GameWorld
- All Superinterfaces:
InstanceWorld
A playable resource instance. There may be any amount of GameWorlds per
ResourceWorld.
A game world is not equal to a Dungeon.
- Author:
- Daniel Saukel
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMob(DungeonMob mob)Registers the given dungeon mobbooleanReturns if it is required to choose a class in order to start the game.Returns the dungeon that the game world is part of.getGame()Returns the game that is played in the game world.getMobs()Returns the living dungeon mobsCollection<org.bukkit.block.Block>Returns a collection of the blocks that have been placed by players in the current game.org.bukkit.LocationgetStartLocation(PlayerGroup group)Returns the start location of the world.getType()Returns theGameWorld.Typeof this GameWorld.booleanReturns if the game has begun in the game world.voidremoveMob(DungeonMob mob)Unregisters the given dungeon mobvoidsetClassesEnabled(boolean enabled)Sets if it is required to choose a class in order to start the game.voidsetType(GameWorld.Type type)Sets theGameWorld.Typeof this GameWorld.Methods inherited from interface de.erethon.dungeonsxl.api.world.InstanceWorld
createDungeonSign, delete, getDungeonSign, getDungeonSigns, getFolder, getId, getLobbyLocation, getName, getPlayers, getResource, getWorld, kickAllPlayers, removeDungeonSign, removeDungeonSign, sendMessage, setLobbyLocation
-
Method Details
-
getType
GameWorld.Type getType()Returns theGameWorld.Typeof this GameWorld.- Returns:
- the
GameWorld.Typeof this GameWorld
-
setType
Sets theGameWorld.Typeof this GameWorld.- Parameters:
type- the type
-
getGame
Game getGame()Returns the game that is played in the game world.- Returns:
- the game that is played in the game world
-
getDungeon
Dungeon getDungeon()Returns the dungeon that the game world is part of.Note: While a
ResourceWorldmay be part of multiple dungeons, an instance is instantiated per game and thus has just one dungeon.- Returns:
- the dungeon that the game world is part of
-
getMobs
Collection<DungeonMob> getMobs()Returns the living dungeon mobs- Returns:
- the living dungeon mobs
-
addMob
Registers the given dungeon mob- Parameters:
mob- the mob
-
removeMob
Unregisters the given dungeon mob- Parameters:
mob- the mob
-
isPlaying
boolean isPlaying()Returns if the game has begun in the game world.- Returns:
- if the game has begun in the game world
-
getStartLocation
Returns the start location of the world. This may be set by a startsignor, if none exists, the Vanilla spawn location of theworld.- Parameters:
group- each group might have its own start location- Returns:
- the start location of the world
-
areClassesEnabled
boolean areClassesEnabled()Returns if it is required to choose a class in order to start the game.- Returns:
- if it is required to choose a class in order to start the game
-
setClassesEnabled
void setClassesEnabled(boolean enabled)Sets if it is required to choose a class in order to start the game.- Parameters:
enabled- if it is required to choose a class in order to start the game
-
getPlacedBlocks
Collection<org.bukkit.block.Block> getPlacedBlocks()Returns a collection of the blocks that have been placed by players in the current game.- Returns:
- a collection of the blocks that have been placed by players in the current game
-