Implemented new Server methods (getWorld + changes to createWorld)

This commit is contained in:
Dinnerbone
2011-02-08 12:03:36 +00:00
parent 50e42496e3
commit 6751433a8e
3 changed files with 23 additions and 9 deletions

View File

@@ -25,17 +25,21 @@ import org.bukkit.World;
public class CraftWorld implements World {
private final WorldServer world;
private final Environment environment;
private final CraftServer server;
private static final Random rand = new Random();
public CraftWorld(WorldServer world) {
this.world = world;
this.server = world.getServer();
if (world.q instanceof WorldProviderHell) {
environment = Environment.NETHER;
} else {
environment = Environment.NORMAL;
}
server.addWorld(this);
}
public Block getBlockAt(int x, int y, int z) {