Interface LevelCreator

All Known Implementing Classes:
LevelCreatorImpl

@NullMarked @AsOf("2.4.0") public interface LevelCreator
A more in depth representation of a WorldCreator.
Since:
2.4.0
  • Method Details

    • resourceKey

      @AsOf("2.4.0") ResourceKey resourceKey()
      The key the world and its level stem are registered under.
      Returns:
      the key the world and its level stem is registered under
      Since:
      2.4.0
    • dimension

      @AsOf("2.4.0") Dimension dimension()
      The dimension of the world.
      Returns:
      the dimension of the world
      Since:
      2.4.0
    • generator

      @AsOf("2.4.0") ChunkGenerator generator()
      The chunk generator to use for the world.
      Returns:
      the chunk generator to use for the world.
      Since:
      2.4.0
    • seed

      @AsOf("2.4.0") long seed()
      The seed to use for the world.
      Returns:
      the seed to use for the world.
      Since:
      2.4.0
    • generateStructures

      @AsOf("2.4.0") boolean generateStructures()
      Whether to generate structures in the world.
      Returns:
      whether to generate structures in the world.
      Since:
      2.4.0
    • bonusChest

      @AsOf("2.4.0") boolean bonusChest()
      Whether to generate a bonus chest in the world.
      Returns:
      whether to generate a bonus chest in the world.
      Since:
      2.4.0
    • environment

      @AsOf("2.4.0") @Obsolete World.Environment environment()
      The environment of the world.
      Returns:
      the environment of the world.
      Since:
      2.4.0
    • persistence

      @AsOf("2.4.0") StemPersistence persistence()
      The persistence of the world.
      Returns:
      the persistence of the world.
      Since:
      2.4.0
    • spawners

      @AsOf("2.4.0") List<LevelSpawner> spawners()
      The spawners of the world.
      Returns:
      the spawners of the world.
      Since:
      2.4.0
    • name

      @AsOf("3.0.0") String name()
      The name of the world.
      Returns:
      the name of the world, as it appears in Bukkit.
      Since:
      2.4.0
    • bukkitWorld

      @AsOf("2.4.0") @Nullable World bukkitWorld()
      Converts this LevelCreator to a World.
      Returns:
      a World equivalent to this LevelCreator
      Since:
      2.4.0
    • create

      @AsOf("2.4.0") default World create()
      Creates a new bukkit world from this level creator.
      Returns:
      a new World from this LevelCreator
      Since:
      2.4.0
    • toBuilder

      @AsOf("3.0.0") default LevelCreator.Builder toBuilder()
      Converts this back into a builder.
      Returns:
      a new builder from this instance
      Since:
      3.0.0
    • builder

      @AsOf("2.4.0") static LevelCreator.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      2.4.0
    • builder

      @AsOf("2.4.0") static LevelCreator.Builder builder(ResourceKey levelKey)
      Creates a new builder seeded with the given level key.
      Parameters:
      levelKey - the level key to seed the builder with
      Returns:
      a new builder seeded with the given level key
      Since:
      2.4.0