mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-07 03:11:02 +01:00
Fixed javadoc of the WorldManager.
This commit is contained in:
parent
fbc5c6f0d2
commit
5d11e27eb0
@ -46,8 +46,10 @@ public class WorldManager implements MVWorldManager {
|
||||
this.worlds = new HashMap<String, MultiverseWorld>();
|
||||
this.worldPurger = new PurgeWorlds(this.plugin);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public boolean addWorld(String name, Environment env, String seedString, String generator) {
|
||||
plugin.log(Level.FINE, "Adding world with: " + name + ", " + env.toString() + ", " + seedString + ", " + generator);
|
||||
Long seed = null;
|
||||
@ -106,7 +108,9 @@ public class WorldManager implements MVWorldManager {
|
||||
return plugin != null && plugin.isEnabled();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public ChunkGenerator getChunkGenerator(String generator, String generatorID, String worldName) {
|
||||
if (generator == null) {
|
||||
return null;
|
||||
@ -142,6 +146,9 @@ public class WorldManager implements MVWorldManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public boolean unloadWorld(String name) {
|
||||
|
||||
if (this.worlds.containsKey(name)) {
|
||||
@ -158,6 +165,9 @@ public class WorldManager implements MVWorldManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public boolean loadWorld(String name) {
|
||||
// Check if the World is already loaded
|
||||
if (this.worlds.containsKey(name)) {
|
||||
@ -182,6 +192,9 @@ public class WorldManager implements MVWorldManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Boolean deleteWorld(String name) {
|
||||
|
||||
if (this.plugin.getServer().getWorld(name) != null) {
|
||||
@ -244,6 +257,9 @@ public class WorldManager implements MVWorldManager {
|
||||
return this.plugin.getServer().unloadWorld(name, safely);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void removePlayersFromWorld(String name) {
|
||||
World w = this.plugin.getServer().getWorld(name);
|
||||
if (w != null) {
|
||||
@ -256,22 +272,16 @@ public class WorldManager implements MVWorldManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of all the worlds Multiverse knows about.
|
||||
*
|
||||
* @return A list of {@link MVWorld}.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Collection<MultiverseWorld> getMVWorlds() {
|
||||
return this.worlds.values();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@link MVWorld} if it exists, and null if it does not. This will search name AND alias.
|
||||
*
|
||||
* @param name The name or alias of the world to get.
|
||||
*
|
||||
* @return A {@link MVWorld} or null.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public MultiverseWorld getMVWorld(String name) {
|
||||
@ -281,6 +291,9 @@ public class WorldManager implements MVWorldManager {
|
||||
return this.getMVWorldByAlias(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public MultiverseWorld getMVWorld(World world) {
|
||||
if (world != null) {
|
||||
@ -306,11 +319,7 @@ public class WorldManager implements MVWorldManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if the given name is a valid {@link MVWorld}
|
||||
*
|
||||
* @param name The name or alias of the world to check.
|
||||
*
|
||||
* @return True if the world exists, false if not.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean isMVWorld(String name) {
|
||||
@ -318,11 +327,7 @@ public class WorldManager implements MVWorldManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if the given world is a valid {@link MultiverseWorld}
|
||||
*
|
||||
* @param world The Bukkit world to check.
|
||||
*
|
||||
* @return True if the world has been loaded into MV2, false if not.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean isMVWorld(World world) {
|
||||
@ -346,9 +351,7 @@ public class WorldManager implements MVWorldManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Worlds & Settings from the configuration file.
|
||||
*
|
||||
* @param forceLoad If set to true, this will perform a total reset and not just load new worlds.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void loadWorlds(boolean forceLoad) {
|
||||
// Basic Counter to count how many Worlds we are loading.
|
||||
@ -411,9 +414,7 @@ public class WorldManager implements MVWorldManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the World Purger.
|
||||
*
|
||||
* @return A valid {@link PurgeWorlds}.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public PurgeWorlds getWorldPurger() {
|
||||
return this.worldPurger;
|
||||
|
Loading…
Reference in New Issue
Block a user