Added World.Environment enum, changed createWorld to use it
This commit is contained in:
parent
539bcff378
commit
93d15e6228
@ -89,8 +89,15 @@ public interface Server {
|
|||||||
* @return A list of worlds
|
* @return A list of worlds
|
||||||
*/
|
*/
|
||||||
public List<World> getWorlds();
|
public List<World> getWorlds();
|
||||||
|
|
||||||
public World createWorld(String name, boolean nether);
|
/**
|
||||||
|
* Creates or loads a world with the given name
|
||||||
|
*
|
||||||
|
* @param name Name of the world to load
|
||||||
|
* @param environment Environment type of the world
|
||||||
|
* @return Newly created or loaded World
|
||||||
|
*/
|
||||||
|
public World createWorld(String name, World.Environment environment);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the server, refreshing settings and plugin information
|
* Reloads the server, refreshing settings and plugin information
|
||||||
|
@ -258,4 +258,26 @@ public interface World {
|
|||||||
* @see setTime
|
* @see setTime
|
||||||
*/
|
*/
|
||||||
public void setFullTime(long time);
|
public void setFullTime(long time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the environment type of this world
|
||||||
|
*
|
||||||
|
* @return This worlds Environment type
|
||||||
|
*/
|
||||||
|
public Environment getEnvironment();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents various map environment types that a world may be
|
||||||
|
*/
|
||||||
|
public enum Environment {
|
||||||
|
/**
|
||||||
|
* Represents the "normal"/"surface world" map
|
||||||
|
*/
|
||||||
|
NORMAL,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a nether based map
|
||||||
|
*/
|
||||||
|
NETHER
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user