Interface MVWorldManager
- 
- All Known Implementing Classes:
- WorldManager
 
 public interface MVWorldManagerMultiverse 2 World Manager APIThis API contains all of the world managing functions that your heart desires! 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanaddWorld(java.lang.String name, org.bukkit.World.Environment env, java.lang.String seedString, org.bukkit.WorldType type, java.lang.Boolean generateStructures, java.lang.String generator)Add a new World to the Multiverse Setup.booleanaddWorld(java.lang.String name, org.bukkit.World.Environment env, java.lang.String seedString, org.bukkit.WorldType type, java.lang.Boolean generateStructures, java.lang.String generator, boolean useSpawnAdjust)Add a new World to the Multiverse Setup.booleancloneWorld(java.lang.String oldName, java.lang.String newName)Make a copy of a world.booleancloneWorld(java.lang.String oldName, java.lang.String newName, java.lang.String generator)Deprecated.UsecloneWorld(String, String)instead.booleandeleteWorld(java.lang.String name)Remove the world from the Multiverse list, from the config and deletes the folder.booleandeleteWorld(java.lang.String name, boolean removeConfig)Remove the world from the Multiverse list, from the config if wanted, and deletes the folder.booleandeleteWorld(java.lang.String name, boolean removeFromConfig, boolean deleteWorldFolder)org.bukkit.generator.ChunkGeneratorgetChunkGenerator(java.lang.String generator, java.lang.String generatorID, java.lang.String worldName)Test if a given chunk generator is valid.voidgetDefaultWorldGenerators()This method populates an internal list and needs to be called after multiverse initialization.MultiverseWorldgetFirstSpawnWorld()Gets the world players should spawn in first.MultiverseWorldgetMVWorld(java.lang.String name)Returns aMultiverseWorldif it exists, and null if it does not.MultiverseWorldgetMVWorld(java.lang.String name, boolean checkAliases)Returns aMultiverseWorldif the world with name given exists, and null if it does not.MultiverseWorldgetMVWorld(org.bukkit.World world)Returns aMultiverseWorldif it exists, and null if it does not.java.util.Collection<MultiverseWorld>getMVWorlds()Returns a list of all the worlds Multiverse knows about.java.util.Collection<java.lang.String>getPotentialWorlds()Get all the possible worlds that Multiverse has detected to be importable.MultiverseWorldgetSpawnWorld()Gets the world players will spawn in on first join.WorldPurgergetTheWorldPurger()Gets theWorldPurger.java.util.List<java.lang.String>getUnloadedWorlds()Gets the list of worlds in the config, but unloaded.PurgeWorldsgetWorldPurger()Deprecated.PurgeWorldsis deprecated!booleanhasUnloadedWorld(java.lang.String name, boolean includeLoaded)Checks whether Multiverse knows about a provided unloaded world.booleanisKeepingSpawnInMemory(org.bukkit.World world)booleanisMVWorld(java.lang.String name)Checks to see if the given name is a validMultiverseWorldSearches based on world name AND alias.booleanisMVWorld(java.lang.String name, boolean checkAliases)Checks to see if the given name is a validMultiverseWorld.booleanisMVWorld(org.bukkit.World world)Checks to see if the given world is a validMultiverseWorld.voidloadDefaultWorlds()Loads the Worlds & Settings for any worlds that bukkit loaded before us.booleanloadWorld(java.lang.String name)Loads the world.org.bukkit.configuration.file.FileConfigurationloadWorldConfig(java.io.File file)Load the config from a file.voidloadWorlds(boolean forceLoad)Load the Worlds & Settings from the configuration file.booleanregenWorld(java.lang.String name, boolean useNewSeed, boolean randomSeed, java.lang.String seed)Regenerates a world.booleanregenWorld(java.lang.String name, boolean useNewSeed, boolean randomSeed, java.lang.String seed, boolean keepGameRules)Regenerates a world.voidremovePlayersFromWorld(java.lang.String name)Removes all players from the specified world.booleanremoveWorldFromConfig(java.lang.String name)Remove the world from the Multiverse list and from the config.booleansaveWorldsConfig()Saves the world config to disk.voidsetFirstSpawnWorld(java.lang.String world)Sets the initial spawn world for new players.booleanunloadWorld(java.lang.String name)Unload a world from Multiverse.booleanunloadWorld(java.lang.String name, boolean unloadBukkit)Unload a world from Multiverse with option to prevent calling unloadWorld in Bukkit.
 
- 
- 
- 
Method Detail- 
addWorldboolean addWorld(java.lang.String name, org.bukkit.World.Environment env, java.lang.String seedString, org.bukkit.WorldType type, java.lang.Boolean generateStructures, java.lang.String generator)Add a new World to the Multiverse Setup.- Parameters:
- name- World Name
- env- Environment Type
- seedString- The seed in the form of a string. If the seed is a Long, it will be interpreted as such.
- type- The Type of the world to be made.
- generateStructures- If true, this world will get NPC villages.
- generator- The Custom generator plugin to use.
- Returns:
- True if the world is added, false if not.
 
 - 
addWorldboolean addWorld(java.lang.String name, org.bukkit.World.Environment env, java.lang.String seedString, org.bukkit.WorldType type, java.lang.Boolean generateStructures, java.lang.String generator, boolean useSpawnAdjust)Add a new World to the Multiverse Setup.- Parameters:
- name- World Name
- env- Environment Type
- seedString- The seed in the form of a string. If the seed is a Long, it will be interpreted as such.
- type- The Type of the world to be made.
- generateStructures- If true, this world will get NPC villages.
- generator- The Custom generator plugin to use.
- useSpawnAdjust- If true, multiverse will search for a safe spawn. If not, It will not modify the level.dat.
- Returns:
- True if the world is added, false if not.
 
 - 
cloneWorld@Deprecated boolean cloneWorld(java.lang.String oldName, java.lang.String newName, java.lang.String generator)Deprecated.UsecloneWorld(String, String)instead.Make a copy of a world.- Parameters:
- oldName- Name of world to be copied
- newName- Name of world to be created
- generator- The Custom generator plugin to use. Ignored.
- Returns:
- True if the world is copied successfully, false if not.
 
 - 
cloneWorldboolean cloneWorld(java.lang.String oldName, java.lang.String newName)Make a copy of a world.- Parameters:
- oldName- Name of world to be copied
- newName- Name of world to be created
- Returns:
- True if the world is copied successfully, false if not.
 
 - 
deleteWorldboolean deleteWorld(java.lang.String name) Remove the world from the Multiverse list, from the config and deletes the folder.- Parameters:
- name- The name of the world to remove
- Returns:
- True if success, false if failure.
 
 - 
deleteWorldboolean deleteWorld(java.lang.String name, boolean removeConfig)Remove the world from the Multiverse list, from the config if wanted, and deletes the folder.- Parameters:
- name- The name of the world to remove
- removeConfig- If true(default), we'll remove the entries from the config. If false, they'll stay and the world may come back.
- Returns:
- True if success, false if failure.
 
 - 
deleteWorldboolean deleteWorld(java.lang.String name, boolean removeFromConfig, boolean deleteWorldFolder)- Parameters:
- name- The name of the world to remove
- removeFromConfig- If true(default), we'll remove the entries from the config. If false, they'll stay and the world may come back.
- deleteWorldFolder- If true the world folder will be completely deleted. If false only the contents of the world folder will be deleted
- Returns:
- True if success, false if failure.
 
 - 
unloadWorldboolean unloadWorld(java.lang.String name) Unload a world from Multiverse.- Parameters:
- name- Name of the world to unload
- Returns:
- True if the world was unloaded, false if not.
 
 - 
unloadWorldboolean unloadWorld(java.lang.String name, boolean unloadBukkit)Unload a world from Multiverse with option to prevent calling unloadWorld in Bukkit.- Parameters:
- name- Name of the world to unload
- unloadBukkit- True if Bukkit world should be unloaded
- Returns:
- True if the world was unloaded, false if not.
 
 - 
loadWorldboolean loadWorld(java.lang.String name) Loads the world. Only use this if the world has been unloaded withunloadWorld(String).- Parameters:
- name- The name of the world to load
- Returns:
- True if success, false if failure.
 
 - 
removePlayersFromWorldvoid removePlayersFromWorld(java.lang.String name) Removes all players from the specified world.- Parameters:
- name- World to remove players from.
 
 - 
getChunkGeneratororg.bukkit.generator.ChunkGenerator getChunkGenerator(java.lang.String generator, java.lang.String generatorID, java.lang.String worldName)Test if a given chunk generator is valid.- Parameters:
- generator- The generator name.
- generatorID- The generator id.
- worldName- The worldName to use as the default.
- Returns:
- A ChunkGeneratoror null
 
 - 
getMVWorldsjava.util.Collection<MultiverseWorld> getMVWorlds() Returns a list of all the worlds Multiverse knows about.- Returns:
- A list of MultiverseWorld.
 
 - 
getMVWorldMultiverseWorld getMVWorld(java.lang.String name) Returns aMultiverseWorldif it exists, and null if it does not. This will search name AND alias.- Parameters:
- name- The name or alias of the world to get.
- Returns:
- A MultiverseWorldor null.
 
 - 
getMVWorldMultiverseWorld getMVWorld(java.lang.String name, boolean checkAliases) Returns aMultiverseWorldif the world with name given exists, and null if it does not. This will search optionally for alias names.- Parameters:
- name- The name or optionally the alias of the world to get.
- checkAliases- Indicates whether to check for world alias name.
- Returns:
- A MultiverseWorldor null.
 
 - 
getMVWorldMultiverseWorld getMVWorld(org.bukkit.World world) Returns aMultiverseWorldif it exists, and null if it does not.- Parameters:
- world- The Bukkit world to check.
- Returns:
- A MultiverseWorldor null.
 
 - 
isMVWorldboolean isMVWorld(java.lang.String name) Checks to see if the given name is a validMultiverseWorldSearches based on world name AND alias.- Parameters:
- name- The name or alias of the world to check.
- Returns:
- True if the world exists, false if not.
 
 - 
isMVWorldboolean isMVWorld(java.lang.String name, boolean checkAliases)Checks to see if the given name is a validMultiverseWorld. Optionally searches by alias is specified.- Parameters:
- name- The name or alias of the world to check.
- checkAliases- Indicates whether to check for world alias name.
- Returns:
- True if the world exists, false if not.
 
 - 
isMVWorldboolean isMVWorld(org.bukkit.World world) Checks to see if the given world is a validMultiverseWorld.- Parameters:
- world- The Bukkit world to check.
- Returns:
- True if the world has been loaded into MV2, false if not.
 
 - 
loadWorldsvoid loadWorlds(boolean forceLoad) Load the Worlds & Settings from the configuration file.- Parameters:
- forceLoad- If set to true, this will perform a total reset and not just load new worlds.
 
 - 
loadDefaultWorldsvoid loadDefaultWorlds() Loads the Worlds & Settings for any worlds that bukkit loaded before us.This way people will _always_ have some worlds in the list. 
 - 
getWorldPurger@Deprecated PurgeWorlds getWorldPurger() Deprecated.PurgeWorldsis deprecated!Return the World Purger.- Returns:
- A valid PurgeWorlds.
 
 - 
getTheWorldPurgerWorldPurger getTheWorldPurger() Gets theWorldPurger.TODO: Remove getWorldPurger()and replace it with this method.- Returns:
- The WorldPurgerthisMVWorldManageris using.
- See Also:
- WorldPurger,- SimpleWorldPurger
 
 - 
getSpawnWorldMultiverseWorld getSpawnWorld() Gets the world players will spawn in on first join. Currently this always returns worlds.get(0) from Bukkit.- Returns:
- A Multiverse world that players will spawn in or null if no MV world has been set.
 
 - 
getUnloadedWorldsjava.util.List<java.lang.String> getUnloadedWorlds() Gets the list of worlds in the config, but unloaded.- Returns:
- A List of worlds as strings.
 
 - 
getDefaultWorldGeneratorsvoid getDefaultWorldGenerators() This method populates an internal list and needs to be called after multiverse initialization.
 - 
loadWorldConfigorg.bukkit.configuration.file.FileConfiguration loadWorldConfig(java.io.File file) Load the config from a file.- Parameters:
- file- The file to load.
- Returns:
- A loaded configuration.
 
 - 
saveWorldsConfigboolean saveWorldsConfig() Saves the world config to disk.- Returns:
- True if success, false if fail.
 
 - 
removeWorldFromConfigboolean removeWorldFromConfig(java.lang.String name) Remove the world from the Multiverse list and from the config.- Parameters:
- name- The name of the world to remove
- Returns:
- True if success, false if failure.
 
 - 
setFirstSpawnWorldvoid setFirstSpawnWorld(java.lang.String world) Sets the initial spawn world for new players.- Parameters:
- world- The World new players should spawn in.
 
 - 
getFirstSpawnWorldMultiverseWorld getFirstSpawnWorld() Gets the world players should spawn in first.- Returns:
- The MultiverseWorldnew players should spawn in.
 
 - 
regenWorldboolean regenWorld(java.lang.String name, boolean useNewSeed, boolean randomSeed, java.lang.String seed)Regenerates a world.- Parameters:
- name- Name of the world to regenerate
- useNewSeed- If a new seed should be used
- randomSeed- If the new seed should be random
- seed- The seed of the world.
- Returns:
- True if success, false if fail.
 
 - 
regenWorldboolean regenWorld(java.lang.String name, boolean useNewSeed, boolean randomSeed, java.lang.String seed, boolean keepGameRules)Regenerates a world.- Parameters:
- name- Name of the world to regenerate
- useNewSeed- If a new seed should be used
- randomSeed- If the new seed should be random
- seed- The seed of the world.
- keepGameRules- If GameRules should be kept on world regen.
- Returns:
- True if success, false if fail.
 
 - 
isKeepingSpawnInMemoryboolean isKeepingSpawnInMemory(org.bukkit.World world) 
 - 
hasUnloadedWorldboolean hasUnloadedWorld(java.lang.String name, boolean includeLoaded)Checks whether Multiverse knows about a provided unloaded world. This method will check the parameter against the alias mappings.- Parameters:
- name- The name of the unloaded world
- includeLoaded- The value to return if the world is loaded
- Returns:
- True if the world exists and is unloaded. False if the world
 does not exist. includeLoadedif the world exists and is loaded.
 
 - 
getPotentialWorldsjava.util.Collection<java.lang.String> getPotentialWorlds() Get all the possible worlds that Multiverse has detected to be importable.- Returns:
- A collection of world names that are deemed importable.
 
 
- 
 
-