Creating a Mock World
Often times one needs to interact with the minecraft world. MockBukkit always creates superflat worlds on the fly. Each block in the world is generated the moment it is accessed for the first time, so creation new worlds is a very cheap operation.
The following code will create a flat world
java
WorldMock world = server.addSimpleWorld("my_world");
kotlin
val world = server.addSimpleWorld("my_world")
Every time MockBukkit is started a world called world
is automatically created. All players are also added to this default world.