summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-08 11:58:28 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-08 11:58:28 +0000
commit5c887b83d5c844f41d11470adb95542a00d272aa (patch)
treef8b8222bba477bcad47a13e3802730d7d2600630 /src
parent0731a0a00c8bbf80ba79437ffa268c0fc8ef499b (diff)
downloadbukkit-5c887b83d5c844f41d11470adb95542a00d272aa.tar
bukkit-5c887b83d5c844f41d11470adb95542a00d272aa.tar.gz
bukkit-5c887b83d5c844f41d11470adb95542a00d272aa.tar.lz
bukkit-5c887b83d5c844f41d11470adb95542a00d272aa.tar.xz
bukkit-5c887b83d5c844f41d11470adb95542a00d272aa.zip
Added Server.getWorld(), Server.createWorld() now checks this to avoid duplication
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/Server.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 8bc34133..c0a4ed72 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -91,7 +91,9 @@ public interface Server {
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 environment Environment type of the world
@@ -100,6 +102,14 @@ public interface Server {
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
*/
public void reload();