Interface GameWorld

All Superinterfaces:
InstanceWorld

public interface GameWorld extends 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
  • Method Details

    • getType

      GameWorld.Type getType()
      Returns the GameWorld.Type of this GameWorld.
      Returns:
      the GameWorld.Type of this GameWorld
    • setType

      void setType(GameWorld.Type type)
      Sets the GameWorld.Type of 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 ResourceWorld may 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

      Returns the living dungeon mobs
      Returns:
      the living dungeon mobs
    • addMob

      void addMob(DungeonMob mob)
      Registers the given dungeon mob
      Parameters:
      mob - the mob
    • removeMob

      void removeMob(DungeonMob mob)
      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

      org.bukkit.Location getStartLocation(PlayerGroup group)
      Returns the start location of the world. This may be set by a start sign or, if none exists, the Vanilla spawn location of the world.
      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