mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-07 16:12:02 +01:00
Added Server.getWorld(), Server.createWorld() now checks this to avoid duplication
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
2dee4ab20e
commit
002613da66
@ -91,7 +91,9 @@ public interface Server {
|
|||||||
public List<World> getWorlds();
|
public List<World> getWorlds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates or loads a world with the given name
|
* Creates or loads a world with the given name.
|
||||||
|
* If the world is already loaded, it will just return the equivalent of
|
||||||
|
* getWorld(name)
|
||||||
*
|
*
|
||||||
* @param name Name of the world to load
|
* @param name Name of the world to load
|
||||||
* @param environment Environment type of the world
|
* @param environment Environment type of the world
|
||||||
@ -99,6 +101,14 @@ public interface Server {
|
|||||||
*/
|
*/
|
||||||
public World createWorld(String name, World.Environment environment);
|
public World createWorld(String name, World.Environment environment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the world with the given name
|
||||||
|
*
|
||||||
|
* @param name Name of the world to retrieve
|
||||||
|
* @return World with the given name, or null if none exists
|
||||||
|
*/
|
||||||
|
public World getWorld(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the server, refreshing settings and plugin information
|
* Reloads the server, refreshing settings and plugin information
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user