Interface IWorlds
public interface IWorlds
Worlds facet of the framework: create worlds from defaults, specs, or provisioned templates, or configure one
through a builder.
Obtained from ILightkeeperFramework.worlds().
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a world builder.create()Creates a new world using framework defaults.Creates a new world from a world spec.fromTemplate(String templateName) Loads a world from a pre-provisioned template folder.main()Gets the main world handle.
-
Method Details
-
main
WorldHandle main()Gets the main world handle.- Returns:
- The main world handle.
-
create
WorldHandle create()Creates a new world using framework defaults.- Returns:
- The created world handle.
-
create
Creates a new world from a world spec.- Parameters:
worldSpec- The world specification.- Returns:
- The created world handle.
-
fromTemplate
Loads a world from a pre-provisioned template folder.Templates are world folders provisioned into the server directory by the Maven plugin's
<worlds>configuration (typically withloadOnStartup=false). The name is validated against the runtime manifest's provisioned-template list before touching the server: a typo fails loudly instead of silently creating a fresh world.A provisioned world that is already loaded (e.g. one with
loadOnStartup=true) is returned as-is rather than reloaded.- Parameters:
templateName- The provisioned world folder's name.- Returns:
- A handle for the loaded world.
- Throws:
IllegalArgumentException- If no template with that name was provisioned; the message lists the available templates.
-
builder
IWorldBuilder builder()Creates a world builder.- Returns:
- A new world builder.
-